Skip to content

Commit

Permalink
Fix exception handling in cache.py
Browse files Browse the repository at this point in the history
  • Loading branch information
saleh-mir committed Oct 5, 2024
1 parent 954daec commit 58d8525
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jesse/services/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, path: str) -> None:
with open(f"{self.path}cache_database.pickle", 'rb') as f:
try:
self.db = pickle.load(f)
except EOFError:
except (EOFError, pickle.UnpicklingError):
# File got broken
self.db = {}
# if not, create a dict object. We'll create the file when using set_value()
Expand Down

0 comments on commit 58d8525

Please sign in to comment.