Skip to content

Commit

Permalink
fix: Catch ModuleNotFoundError on cache retrieve (#258)
Browse files Browse the repository at this point in the history
Catch ModuleNotFoundError for error cases due to pickle serialization of old classpath
  • Loading branch information
LucasGrugru authored Jun 3, 2024
1 parent 6df9704 commit 60101f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cachalot/monkey_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _get_result_or_execute_query(execute_query_func, cache,
cache_key, table_cache_keys):
try:
data = cache.get_many(table_cache_keys + [cache_key])
except KeyError:
except (KeyError, ModuleNotFoundError):
data = None

new_table_cache_keys = set(table_cache_keys)
Expand Down

0 comments on commit 60101f7

Please sign in to comment.