Skip to content

Catch error if trying to load zero bytes resume file

Currently, when loading a resume file, it assumes that dill.load() will work successfully. This requires that the file is a valid pickle file, even if it an empty file (as generated by bilby_pipe for file transfer reasons). However, if would be useful if this could just be a generic zero bytes dummy file as output by, e.g., touch.

This MR adds try...except calls around dill.load() to catch cases of zero bytes files, or checks for check point files being 0 bytes in size.

Edited by Matthew Pitkin

Merge request reports

Loading