Skip to content

Commit

Permalink
fix(writer): made writing file close and updated gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
SreeDan committed Mar 1, 2024
1 parent 74c33f4 commit b96c7c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ __pycache__/
result
result/
.env
.idea
.idea/
2 changes: 2 additions & 0 deletions py_data_acq/py_data_acq/mcap_writer/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit b96c7c6

Please sign in to comment.