fermi-ad / datalogger-to-ml

Scripts for requesting AD Controls data logger data and transforming those to the desired ML output format and destination.
3 stars 0 forks source link

Use context manager to ensure files are closed #17

Closed beauremus closed 3 years ago

beauremus commented 3 years ago

Python typically closes files on exit but there is the potential for leaving a file open if we don't handle exits appropriately. The Pythonic way to handle this is with a context manager.

We should review every instance where a file is opened and make sure that the with keyword is being used so that when the scope is left, the file is closed.