mirror of
https://github.com/github/spec-kit.git
synced 2026-03-19 20:03:07 +00:00
fix: narrow empty except blocks and add explanatory comments
This commit is contained in:
@@ -1606,7 +1606,8 @@ def init(
|
|||||||
# Clean up downloaded ZIP to avoid cache accumulation
|
# Clean up downloaded ZIP to avoid cache accumulation
|
||||||
try:
|
try:
|
||||||
zip_path.unlink(missing_ok=True)
|
zip_path.unlink(missing_ok=True)
|
||||||
except Exception:
|
except OSError:
|
||||||
|
# Best-effort cleanup; failure to delete is non-fatal
|
||||||
pass
|
pass
|
||||||
except PresetError:
|
except PresetError:
|
||||||
console.print(f"[yellow]Warning:[/yellow] Preset '{preset}' not found in catalog. Skipping.")
|
console.print(f"[yellow]Warning:[/yellow] Preset '{preset}' not found in catalog. Skipping.")
|
||||||
|
|||||||
@@ -1145,6 +1145,7 @@ class PresetCatalog:
|
|||||||
if metadata.get("catalog_url") == catalog_url:
|
if metadata.get("catalog_url") == catalog_url:
|
||||||
return json.loads(self.cache_file.read_text())
|
return json.loads(self.cache_file.read_text())
|
||||||
except (json.JSONDecodeError, OSError):
|
except (json.JSONDecodeError, OSError):
|
||||||
|
# Cache is corrupt or unreadable; fall through to network fetch
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user