Skip to content

Commit 29e9398

Browse files
committed
fix(ci): Fix regression in coverage script
1 parent 62d705b commit 29e9398

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

codetracer-python-recorder/scripts/generate_coverage_comment.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,13 @@ def _load_rust_rows(
118118
summary_path: pathlib.Path,
119119
repo_root: pathlib.Path,
120120
) -> Tuple[List[Row], Dict[str, float]]:
121-
rows, totals = load_rust_summary(summary_path, repo_root)
121+
summary_result = load_rust_summary(summary_path, repo_root)
122+
if not isinstance(summary_result, tuple):
123+
summary_result = tuple(summary_result)
124+
if len(summary_result) < 2:
125+
raise SystemExit("Rust summary loader returned an unexpected payload")
126+
127+
rows, totals = summary_result[:2]
122128
# Normalise totals dict to expected keys
123129
total = float(totals.get("count", 0))
124130
covered = float(totals.get("covered", 0))

0 commit comments

Comments
 (0)