mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-21 06:47:42 +00:00
Prevent ruff running on a couple of lines where catching and not logging an exception is a deliberate choice.
This commit is contained in:
@@ -23,7 +23,7 @@ class SingleObjectDataCache:
|
||||
self._cache.add("object", object_if_empty)
|
||||
try:
|
||||
self._obj = self._cache.get("object")
|
||||
except Exception:
|
||||
except Exception: # noqa: BLE001 (If any exceptions we treat the data as junk and start from scratch, it's probably due to a version upgrade having incompatible data structures, fine to not log the exception in this case)
|
||||
logger.warning(f"Failed to load cache from {cache_dir}, clearing it.")
|
||||
self._cache.clear()
|
||||
self._cache.add("object", object_if_empty)
|
||||
|
||||
Reference in New Issue
Block a user