Skip to content
Snippets Groups Projects

Catch error if trying to load zero bytes resume file

Merged Matthew Pitkin requested to merge matthew-pitkin/bilby:catch_zero_bytes_file into master

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
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading