Skip to content

Commit f554863

Browse files
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.
1 parent be33d2a commit f554863

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/specify_cli/presets/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1727,7 +1727,7 @@ def record_written(written: Dict[str, List[str]]) -> None:
17271727
)
17281728
record_written(written)
17291729
registered = True
1730-
except Exception:
1730+
except (ImportError, FileNotFoundError, OSError, ValueError, TypeError):
17311731
# Extension registration failed; fall back to
17321732
# generic path-based registration below.
17331733
pass

0 commit comments

Comments
 (0)