Skip to content

Commit fa04828

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 753addc commit fa04828

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
@@ -1992,6 +1992,8 @@ def _find_in_subdirs(base_dir: Path) -> Optional[Path]:
19921992
strategy = tmpl.get("strategy", "replace")
19931993
break
19941994
except PresetValidationError:
1995+
# Invalid manifest — fall back to default "replace"
1996+
# strategy so layer resolution still works.
19951997
pass
19961998
version = metadata.get("version", "?") if metadata else "?"
19971999
layers.append({

0 commit comments

Comments
 (0)