When an user intentionally provides an keyboard interrupt, heat-client should provide an crisp message instead of throwing an entire traceback on to the terminal.
As of today nova-client handles keyboard interrupts and provides the following crisp message:
-----------------------------------
stack@ubuntu:/home/x/devstack$ nova list
^CShutting down novaclient
-----------------------------------
also:
----------------------------------
stack@ubuntu:/home/rakesh/devstack$ glance image-list
^C... terminating glance client
stack@ubuntu:/home/rakesh/devstack$ cinder list
^C... terminating cinder client
-----------------------------------
whereas heat-client throws the entire traceback on to the terminal and fills up the terminal space:
-------------------------------------
stack@ubuntu:/home/x/devstack$ heat stack-list
^CTraceback (most recent call last):
File "/usr/local/bin/heat", line 10, in <module>
sys.exit(main())
File "/opt/stack/python-heatclient/heatclient/shell.py", line 443, in main
HeatShell().main(args)
File "/opt/stack/python-heatclient/heatclient/shell.py", line 399, in main
args.func(client, args)
File "/opt/stack/python-heatclient/heatclient/v1/shell.py", line 446, in do_stack_list
utils.print_list(stacks, fields, sortby_index=3)
File "/opt/stack/python-heatclient/heatclient/openstack/common/cliutils.py", line 154, in print_list
for o in objs:
File "/opt/stack/python-heatclient/heatclient/v1/stacks.py", line 85, in paginate
stacks = self._list(url, 'stacks')
File "/opt/stack/python-heatclient/heatclient/openstack/common/apiclient/base.py", line 115, in _list
body = self.client.get(url).json()
File "/opt/stack/python-heatclient/heatclient/common/http.py", line 270, in get
return self.client_request("GET", url, **kwargs)
File "/opt/stack/python-heatclient/heatclient/common/http.py", line 263, in client_request
resp, body = self.json_request(method, url, **kwargs)
File "/opt/stack/python-heatclient/heatclient/common/http.py", line 244, in json_request
resp = self._http_request(url, method, **kwargs)
File "/opt/stack/python-heatclient/heatclient/common/http.py", line 183, in _http_request
**kwargs)
File "/usr/lib/python2.7/dist-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 383, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 486, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 330, in send
timeout=timeout
File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 542, in urlopen
body=body, headers=headers)
File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 394, in _make_request
httplib_response = conn.getresponse(buffering=True)
File "/usr/lib/python2.7/httplib.py", line 1045, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 409, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 365, in _read_status
line = self.fp.readline(_MAXLINE + 1)
File "/usr/lib/python2.7/socket.py", line 476, in readline
data = self._sock.recv(self._rbufsize)
KeyboardInterrupt
--------------------------------------------
Reassigned to the correct launchpad component, as this is about a fix for python-heatclient