So that exits based on user requests are handled more gracefully.
Signed-off-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <
20200904164258.240278-6-crosa@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
"""
parser = create_parser()
args = parser.parse_args()
-
+ success = False
try:
if args.wait:
success = wait_on_pipeline_success(
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: