Don't crash when upgrading a fresh database
This commit is contained in:
parent
39d24e56c3
commit
64ddfdb702
1 changed files with 4 additions and 1 deletions
|
@ -61,7 +61,10 @@ def upgrade():
|
|||
|
||||
# List of file hashes which have not expired yet
|
||||
# This could get really big for some servers
|
||||
try:
|
||||
unexpired_files = set(os.listdir(storage))
|
||||
except FileNotFoundError:
|
||||
return # There are no currently unexpired files
|
||||
|
||||
# Calculate an expiration date for all existing files
|
||||
files = session.scalars(
|
||||
|
|
Loading…
Reference in a new issue