Commit 8a53b55f authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix handling of ^C in the CLI scripts

This adds a message and nice handling of ^C, especially useful for
``gnt-job watch``.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarGuido Trotter <>
parent ee841437
......@@ -1928,6 +1928,11 @@ def GenericMain(commands, override=None, aliases=None):
result, err_msg = FormatError(err)
logging.exception("Error during command processing")
except KeyboardInterrupt:
result = constants.EXIT_FAILURE
ToStderr("Aborted. Note that if the operation created any jobs, they"
" might have been submitted and"
" will continue to run in the background.")
return result
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment