Skip to content

Commit

Permalink
Merge pull request #491 from movy/patch-5
Browse files Browse the repository at this point in the history
handle UnicodeDecodeError
  • Loading branch information
saleh-mir authored Jan 15, 2025
2 parents 3ded648 + ff13489 commit 5ecc58f
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, pickle.UnpicklingError):
except (EOFError, pickle.UnpicklingError, UnicodeDecodeError):
# 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 5ecc58f

Please sign in to comment.