diff options
Diffstat (limited to 'ceilometerclient/v2/shell.py')
-rw-r--r-- | ceilometerclient/v2/shell.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ceilometerclient/v2/shell.py b/ceilometerclient/v2/shell.py index 7c4629b..6237259 100644 --- a/ceilometerclient/v2/shell.py +++ b/ceilometerclient/v2/shell.py @@ -321,9 +321,8 @@ def _display_alarm(alarm): help='ID of the alarm to show.') def do_alarm_show(cc, args={}): '''Show an alarm.''' - try: - alarm = cc.alarms.get(args.alarm_id) - except exc.HTTPNotFound: + alarm = cc.alarms.get(args.alarm_id) + if alarm is None: raise exc.CommandError('Alarm not found: %s' % args.alarm_id) else: _display_alarm(alarm) |