Skip to content

Commit 506b900

Browse files
committed
fix: narrow exception handler in resolve-customization.py
Change except Exception to except (tomllib.TOMLDecodeError, OSError) for clearer failure signaling in user-facing tooling.
1 parent bf06f2c commit 506b900

10 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/skills/bmad-cis-agent-brainstorming-coach/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
4747
try:
4848
with open(path, "rb") as f:
4949
return tomllib.load(f)
50-
except Exception as exc:
50+
except (tomllib.TOMLDecodeError, OSError) as exc:
5151
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
5252
return {}
5353

src/skills/bmad-cis-agent-creative-problem-solver/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
4747
try:
4848
with open(path, "rb") as f:
4949
return tomllib.load(f)
50-
except Exception as exc:
50+
except (tomllib.TOMLDecodeError, OSError) as exc:
5151
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
5252
return {}
5353

src/skills/bmad-cis-agent-design-thinking-coach/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
4747
try:
4848
with open(path, "rb") as f:
4949
return tomllib.load(f)
50-
except Exception as exc:
50+
except (tomllib.TOMLDecodeError, OSError) as exc:
5151
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
5252
return {}
5353

src/skills/bmad-cis-agent-innovation-strategist/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
4747
try:
4848
with open(path, "rb") as f:
4949
return tomllib.load(f)
50-
except Exception as exc:
50+
except (tomllib.TOMLDecodeError, OSError) as exc:
5151
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
5252
return {}
5353

src/skills/bmad-cis-agent-presentation-master/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
4747
try:
4848
with open(path, "rb") as f:
4949
return tomllib.load(f)
50-
except Exception as exc:
50+
except (tomllib.TOMLDecodeError, OSError) as exc:
5151
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
5252
return {}
5353

src/skills/bmad-cis-agent-storyteller/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
4747
try:
4848
with open(path, "rb") as f:
4949
return tomllib.load(f)
50-
except Exception as exc:
50+
except (tomllib.TOMLDecodeError, OSError) as exc:
5151
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
5252
return {}
5353

src/skills/bmad-cis-design-thinking/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
4747
try:
4848
with open(path, "rb") as f:
4949
return tomllib.load(f)
50-
except Exception as exc:
50+
except (tomllib.TOMLDecodeError, OSError) as exc:
5151
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
5252
return {}
5353

src/skills/bmad-cis-innovation-strategy/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
4747
try:
4848
with open(path, "rb") as f:
4949
return tomllib.load(f)
50-
except Exception as exc:
50+
except (tomllib.TOMLDecodeError, OSError) as exc:
5151
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
5252
return {}
5353

src/skills/bmad-cis-problem-solving/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
4747
try:
4848
with open(path, "rb") as f:
4949
return tomllib.load(f)
50-
except Exception as exc:
50+
except (tomllib.TOMLDecodeError, OSError) as exc:
5151
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
5252
return {}
5353

src/skills/bmad-cis-storytelling/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
4747
try:
4848
with open(path, "rb") as f:
4949
return tomllib.load(f)
50-
except Exception as exc:
50+
except (tomllib.TOMLDecodeError, OSError) as exc:
5151
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
5252
return {}
5353

0 commit comments

Comments
 (0)