mirror of
https://github.com/partitioncloud/partitioncloud-server.git
synced 2025-01-23 17:26:26 +01:00
Fix errors
This commit is contained in:
parent
121fa288d2
commit
a7df482f29
@ -85,6 +85,7 @@ def online_search(query):
|
||||
pass
|
||||
except urllib.error.HTTPError as e:
|
||||
print(e)
|
||||
break
|
||||
return partitions
|
||||
|
||||
|
||||
@ -101,8 +102,14 @@ def flush_cache():
|
||||
).fetchall()
|
||||
for element in expired_cache:
|
||||
uuid = element["uuid"]
|
||||
try:
|
||||
os.remove(f"partitioncloud/search-partitions/{uuid}.pdf")
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
try:
|
||||
os.remove(f"partitioncloud/static/search-thumbnails/{uuid}.jpg")
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
db.execute(
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user