Skip to content

Commit 00edba1

Browse files
committed
fix: add explanatory comment to empty except block in layer resolution
Address code-quality review: explain why PresetValidationError is intentionally caught and ignored (falls back to default 'replace' strategy so layer resolution continues).
1 parent 7f64380 commit 00edba1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/specify_cli/presets.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,6 +1966,8 @@ def _find_in_subdirs(base_dir: Path) -> Optional[Path]:
19661966
strategy = tmpl.get("strategy", "replace")
19671967
break
19681968
except PresetValidationError:
1969+
# Invalid manifest — fall back to default "replace"
1970+
# strategy so layer resolution still works.
19691971
pass
19701972
version = metadata.get("version", "?") if metadata else "?"
19711973
layers.append({

0 commit comments

Comments
 (0)