Photon-HDF5 / phconvert

Convert Beker&Hickl, PicoQuant and other formats to Photon-HDF5
http://photon-hdf5.github.io/phconvert
Other
16 stars 14 forks source link

Ensure h5file is closed even if validation fails #52

Closed ramenbytes closed 4 months ago

ramenbytes commented 3 years ago

This fixes a bug where if validation of the Photon-HDF5 file failed, then save_photon_hdf5() would not close it even if the user had requested us to do so. This behavior created an awkward situation if the user did not save the file object in a variable somewhere, since they would be unable to close it and thus unable to try saving to it again without restarting the python process. With this fix, save_photon_hdf5() becomes more amenable to experimenting at the console without interrupting the flow of things to restart the process after mistakenly trying to save malformed data.

ramenbytes commented 3 years ago

I looked at the CI failures, and it doesn't appear to be related to this pull request. Something about missing DLLs I think.

ramenbytes commented 3 years ago

Ping