Skip to content

Commit f50629c

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 07c77c4 commit f50629c

35 files changed

Lines changed: 35 additions & 35 deletions

File tree

src/agents/gds-agent-game-architect/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/agents/gds-agent-game-designer/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/agents/gds-agent-game-dev/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/agents/gds-agent-game-qa/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/agents/gds-agent-game-scrum-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/agents/gds-agent-game-solo-dev/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/agents/gds-agent-tech-writer/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/workflows/1-preproduction/gds-brainstorm-game/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/workflows/1-preproduction/gds-create-game-brief/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/workflows/1-preproduction/research/gds-domain-research/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)