From f554863399ec8afda99e0191ffe035b8ecf709e9 Mon Sep 17 00:00:00 2001 From: Quratulain-bilal Date: Wed, 29 Jul 2026 13:02:22 +0500 Subject: [PATCH] fix: narrow bare except Exception in preset command reconciliation Replace overly broad except Exception with specific exception types (ImportError, FileNotFoundError, OSError, ValueError, TypeError) to let programming errors propagate while still falling back to generic path-based registration for expected failures. --- src/specify_cli/presets/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/specify_cli/presets/__init__.py b/src/specify_cli/presets/__init__.py index e2f6c089a4..a7235bb29e 100644 --- a/src/specify_cli/presets/__init__.py +++ b/src/specify_cli/presets/__init__.py @@ -1727,7 +1727,7 @@ def record_written(written: Dict[str, List[str]]) -> None: ) record_written(written) registered = True - except Exception: + except (ImportError, FileNotFoundError, OSError, ValueError, TypeError): # Extension registration failed; fall back to # generic path-based registration below. pass