close power meter gracefully

This commit is contained in:
Kevin Hester
2024-06-25 12:22:47 -07:00
parent d448ea5767
commit d1aadf0c8e
3 changed files with 9 additions and 0 deletions

View File

@@ -73,6 +73,7 @@ class PowerLogger:
def close(self) -> None:
"""Close the PowerLogger and stop logging."""
if self.is_logging:
self.pMeter.close()
self.is_logging = False
self.thread.join()
self.writer.close()