summaryrefslogtreecommitdiff
path: root/ceilometerclient/shell.py
diff options
context:
space:
mode:
authorliu-sheng <liusheng@huawei.com>2014-05-21 16:40:07 +0800
committerliu-sheng <liusheng@huawei.com>2014-05-23 11:02:18 +0800
commitcb11c9bb3dd9781e6b3066c0db04667c8175db31 (patch)
tree5e7d204328441f167ecc3d510a8a33eee0f70519 /ceilometerclient/shell.py
parent09ad1ed7a3109a936f0e1bc9cbc904292607d70c (diff)
downloadpython-ceilometerclient-cb11c9bb3dd9781e6b3066c0db04667c8175db31.tar.gz
Fix exception handling of CLI
Because exc.Unauthorized exception has been removed for commit "Remove out-dated exceptions"(https://review.openstack.org/#/c/93852/). but it still in use in ceilometerclient.shell.CeilometerShell#main(). This patch replace exc.Unauthorized with exc.HTTPUnauthorized. And other three places of exc.NotFound are in use too. Change-Id: I3e010db20cb6f6636126cceed5c62a9817213739 Closes-bug: #1321649
Diffstat (limited to 'ceilometerclient/shell.py')
-rw-r--r--ceilometerclient/shell.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ceilometerclient/shell.py b/ceilometerclient/shell.py
index 7a028ac..4628f09 100644
--- a/ceilometerclient/shell.py
+++ b/ceilometerclient/shell.py
@@ -287,7 +287,7 @@ class CeilometerShell(object):
# call whatever callback was selected
try:
args.func(client, args)
- except exc.Unauthorized:
+ except exc.HTTPUnauthorized:
raise exc.CommandError("Invalid OpenStack Identity credentials.")
def do_bash_completion(self, args):