Files
python-ceilometerclient/ceilometerclient/common
Eric Pendergrass 8a01731d4e Verify alarm found before modifying
Current behavior is to retrieve alarm by id and conduct operations on the
object.  If the tenant doesn't own the alarm or isn't admin, the user will
receive the message: 'NoneType' object has no attribute 'to_dict'

Above message doesn't provide any useful diagnostic information and indicates a
programming error since an unexpected None-type is encountered and not handled.

This change verifies the alarm is found before using the object.  If alarm not
found it prints the same message for a not found Alarm as other PUT operations
like alarm-state-set:  Alarm not found: <alarm_id>.

This message is more useful for diagnosis and gets rid of the uncaught
None-type error.

Change-Id: I66abcd4498b24ac7cadcf29fe3ced3fcda08458c
Closes-Bug: #1348387
2014-08-29 14:04:30 +00:00
..
2012-11-09 23:31:27 +11:00
2014-08-29 14:04:30 +00:00