]> Git Repo - qemu.git/commitdiff
scripts/ci/gitlab-pipeline-status: handle keyboard interrupts
authorCleber Rosa <[email protected]>
Fri, 4 Sep 2020 16:42:56 +0000 (12:42 -0400)
committerThomas Huth <[email protected]>
Tue, 13 Oct 2020 10:48:17 +0000 (12:48 +0200)
So that exits based on user requests are handled more gracefully.

Signed-off-by: Cleber Rosa <[email protected]>
Message-Id: <20200904164258[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
scripts/ci/gitlab-pipeline-status

index 8355b6a427e6c094398e21d89bd04103fd8f174a..ced488f27c64437238a7f6df923680efc203ce92 100755 (executable)
@@ -132,7 +132,7 @@ def main():
     """
     parser = create_parser()
     args = parser.parse_args()
-
+    success = False
     try:
         if args.wait:
             success = wait_on_pipeline_success(
@@ -145,9 +145,11 @@ def main():
                                          args.commit)
             success = status['status'] == 'success'
     except Exception as error:      # pylint: disable=W0703
-        success = False
         if args.verbose:
             print("ERROR: %s" % error.args[0])
+    except KeyboardInterrupt:
+        if args.verbose:
+            print("Exiting on user's request")
 
     if success:
         if args.verbose:
This page took 0.026011 seconds and 4 git commands to generate.