Skip to content

Commit 3ee4998

Browse files
committed
fix: handle improper coverage format with warning
The start-cluster.log can now contain also information other than `cardano-cli` commands. Previously, an AttributeError was raised when the coverage data was not in the proper format. This change updates the code to log a warning message instead and continue processing. This prevents the program from stopping abruptly due to format issues.
1 parent e5515bc commit 3ee4998

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cardano_node_tests/cardano_cli_coverage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ def get_coverage(coverage_files: list[pl.Path], available_commands: dict) -> dic
176176
coverage = get_log_coverage(in_coverage)
177177

178178
if coverage.get("cardano-cli", {}).get("_count") is None:
179-
msg = f"Data in '{in_coverage}' doesn't seem to be in proper coverage format."
180-
raise AttributeError(msg)
179+
LOGGER.warning(f"Data in '{in_coverage}' doesn't seem to be in proper coverage format")
180+
continue
181181

182182
coverage_dict = merge_coverage(coverage_dict, coverage)
183183

0 commit comments

Comments
 (0)