diff --git a/.obs/wait_obs.py b/.obs/wait_obs.py index 65ff117..5fe1501 100644 --- a/.obs/wait_obs.py +++ b/.obs/wait_obs.py @@ -2,6 +2,7 @@ import xml.etree.ElementTree as ET import subprocess import time import os +import sys from collections import Counter @@ -69,15 +70,14 @@ def print_results(status: ET.Element) -> bool: print("\nPackages failing: ") for fail in failed: print("\t", fail) - return len(failed) != 0 + return len(failed) def main(): project = os.environ.get("OBS_PROJECT") sha = os.environ.get("GIT_SHA") print(f"Waiting for OBS to build {project} for commit {sha}") status = do_wait(project, sha) - if print_results(status): - return 1 + sys.exit(print_results(status)) if __name__ == "__main__": main() \ No newline at end of file