echemdata / galvani

Read proprietary file formats from electrochemical test stations
GNU General Public License v3.0
47 stars 30 forks source link

Use contextmanagers to ensure files are closed on errors #110

Open chatcannon opened 8 months ago

chatcannon commented 8 months ago
          This should really be done with a contextmanager but the `if ...: close()` is better than nothing.

_Originally posted by @chatcannon in https://github.com/echemdata/galvani/pull/102#discussion_r1509970154_