Skip to content
Snippets Groups Projects
Commit ac725690 authored by Matthew David Pitkin's avatar Matthew David Pitkin Committed by Colm Talbot
Browse files

Update sampler.py: don't read state from 0 bytes resume file

parent 2b227d91
No related branches found
No related tags found
1 merge request!1341Catch error if trying to load zero bytes resume file
This commit is part of merge request !1341. Comments created here will be created in the context of that merge request.
......@@ -388,7 +388,7 @@ class Bilby_MCMC(MCMCSampler):
If true, resume file was successfully loaded, otherwise false
"""
if os.path.isfile(self.resume_file) is False:
if os.path.isfile(self.resume_file) is False or not os.path.getsize(self.resume_file):
return False
import dill
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment