handles keyboard interrupt
When an user intentionally provides an keyboard interrupt, ironicclient throws the entire traceback on to the terminal instead of handling it. ironicclient will now handle the keyboard interrrupt and provides an crisp message on to the terminal. Change-Id: I8e657dc0cf64fa3396fb8fd32c5ffb57016ce864 Closes-Bug: #1367283
This commit is contained in:
parent
0a6ec955c0
commit
ad8c27f8e0
@ -288,7 +288,9 @@ class HelpFormatter(argparse.HelpFormatter):
|
||||
def main():
|
||||
try:
|
||||
IronicShell().main(sys.argv[1:])
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("... terminating ironic client", file=sys.stderr)
|
||||
sys.exit(130)
|
||||
except Exception as e:
|
||||
print(str(e), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user