Skip to content

Commit ee1315e

Browse files
Avoid division by zero
1 parent 44b4bc4 commit ee1315e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

developer_support_script/check_build_stability.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def print_results(self) -> None:
179179
# Aborted builds.
180180
valid_builds = self.num_evaluate_builds + self.no_test_report_failures
181181
all_builds = valid_builds + self.num_aborted_builds
182-
percentage_aborted_builds = (self.num_aborted_builds / all_builds) * 100
182+
percentage_aborted_builds = (self.num_aborted_builds / all_builds) * 100 if all_builds > 0 else 0
183183
level = calculate_level(
184184
percentage_aborted_builds, ERROR_THRESHOLD_PERCENTAGE, WARNING_THRESHOLD_PERCENTAGE
185185
)

0 commit comments

Comments
 (0)