mirror of
https://git.0x0.st/mia/0x0.git
synced 2025-04-18 14:33:03 +02:00
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
|
||||
unexpired_files = set(os.listdir(storage))
|
||||
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…
Add table
Reference in a new issue