allow file to be missing
This commit is contained in:
parent
98d4286157
commit
e8a8c6c096
1 changed files with 2 additions and 1 deletions
|
|
@ -150,7 +150,8 @@ class Prefile:
|
|||
try:
|
||||
pre_number = self.file.read_text()
|
||||
except FileNotFoundError:
|
||||
raise FileNotFoundError(f"prefile {self.file} not found. Ensure you have run the pre snapshot first.")
|
||||
pre_number = None
|
||||
logging.warning(f"prefile {self.file} not found. Ensure you have run the pre snapshot first.")
|
||||
else:
|
||||
self.file.unlink()
|
||||
return pre_number
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue