summaryrefslogtreecommitdiff
path: root/heatclient/shell.py
diff options
context:
space:
mode:
authorRakesh H S <rh-s@hp.com>2014-09-10 19:56:37 +0530
committerRakesh H S <rh-s@hp.com>2014-09-10 20:10:23 +0530
commitec44d2a49e2bbc7e486bb1c3399376a61dee357e (patch)
tree472e088a5f96741ba40aac8258ff7589def35a68 /heatclient/shell.py
parentf826bd612e514b1ba29d5f8e5e64a64fb5a83fd3 (diff)
downloadpython-heatclient-ec44d2a49e2bbc7e486bb1c3399376a61dee357e.tar.gz
handles keyboard interrupt
When an user intentionally provides an keyboard interrupt, heatclient throws the entire traceback on to the terminal instead of handling it. heatclient will now handle the keyboard interrrupt and provides an crisp message on to the terminal. Change-Id: Iaa30048e7948d7db1d5b256dd59ca2e0dd842df9 Closes-Bug: #1367283
Diffstat (limited to 'heatclient/shell.py')
-rw-r--r--heatclient/shell.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/heatclient/shell.py b/heatclient/shell.py
index cd00ac6..432b70f 100644
--- a/heatclient/shell.py
+++ b/heatclient/shell.py
@@ -441,6 +441,9 @@ def main(args=None):
args = sys.argv[1:]
HeatShell().main(args)
+ except KeyboardInterrupt:
+ print("... terminating heat client", file=sys.stderr)
+ sys.exit(130)
except Exception as e:
if '--debug' in args or '-d' in args:
raise