Potential fix for pull request finding 'Empty except'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
This commit is contained in:
Manfred Riem
2026-02-27 15:16:52 -06:00
parent ad591607ea
commit 5c77268136

View File

@@ -1158,6 +1158,7 @@ class ExtensionCatalog:
age = (datetime.now(timezone.utc) - cached_at).total_seconds() age = (datetime.now(timezone.utc) - cached_at).total_seconds()
is_valid = age < self.CACHE_DURATION is_valid = age < self.CACHE_DURATION
except (json.JSONDecodeError, ValueError, KeyError): except (json.JSONDecodeError, ValueError, KeyError):
# If metadata is invalid or missing expected fields, treat cache as invalid
pass pass
# Use cache if valid # Use cache if valid