diff --git a/.gitignore b/.gitignore index 66c6d05..a770904 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ __pycache__/ result result/ .env -.idea +.idea/ diff --git a/py_data_acq/py_data_acq/mcap_writer/writer.py b/py_data_acq/py_data_acq/mcap_writer/writer.py index 49f8840..30099ad 100644 --- a/py_data_acq/py_data_acq/mcap_writer/writer.py +++ b/py_data_acq/py_data_acq/mcap_writer/writer.py @@ -30,9 +30,11 @@ def __enter__(self): return self def __exit__(self, exc_, exc_type_, tb_): super().finish() + self.writing_file.close() def __aenter__(self): return self async def __aexit__(self, exc_type: Any, exc_val: Any, traceback: Any): + self.writing_file.close() return super().finish() async def write_msg(self, msg):