Skip to content

Commit

Permalink
widened exception range
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoncl committed Feb 28, 2024
1 parent 6b9ed54 commit f36689b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion encryption/encryption_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _decrypt_data(self, encrypted_data, key_name):
try:
# Attempt to unpickle the decrypted data
return pickle.loads(decrypted_data)
except (pickle.UnpicklingError, EOFError):
except Exception:
# If an error occurs, assume the data is a string and decode it
try:
return decrypted_data.decode('utf-8')
Expand Down

0 comments on commit f36689b

Please sign in to comment.