UCBerkeleySETI / blimpy

Breakthrough Listen I/O Methods for Python
https://blimpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
46 stars 41 forks source link

Try to remove HDF5 files that cannot be fully written due to an exception #232

Closed texadactyl closed 3 years ago

texadactyl commented 3 years ago

In hdf_writer.py, should an exception occur in the middle of writing, function __write_to_hdf5_heavy() will now try to remove it so that an incomplete/damaged file is not produced. Note that if the exception is due to running out of disk space, this effort might fail.