summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanjana Pai <sanjana@hitachi.co.in>2015-12-09 12:03:26 +0530
committersanjana <sanjana@hitachi.co.in>2015-12-14 08:44:56 +0000
commit2af229206d3232b59fd52a72680614c0c4b4bb2f (patch)
tree5c251ec21caac8adf1cd5ceea0043b243348e192
parent9eb552d023950f3ccbf372578e6a4646195fda59 (diff)
downloadpython-ceilometerclient-2af229206d3232b59fd52a72680614c0c4b4bb2f.tar.gz
Restructuring a comment in Python-Ceilometerclient
The comment describes the handling of HTTPNotFound exception about alarm, but it is ambiguous, this change make it more clear. Closes-Bug:#1523866 Change-Id: Id7be71dcda6693875222435e10cba929e7c81e56
-rw-r--r--ceilometerclient/v2/alarms.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/ceilometerclient/v2/alarms.py b/ceilometerclient/v2/alarms.py
index e7dfd36..393dc09 100644
--- a/ceilometerclient/v2/alarms.py
+++ b/ceilometerclient/v2/alarms.py
@@ -89,11 +89,10 @@ class AlarmManager(base.Manager):
return None
except exc.HTTPNotFound:
- # When we try to get deleted alarm HTTPNotFound occurs
- # or when alarm doesn't exists this exception don't must
- # go deeper because cleanUp() (method which remove all
- # created things like instance, alarm, etc.) at scenario
- # tests doesn't know how to process it
+ # When we try to get a deleted alarm, or
+ # when an alarm doesn't exist, HTTPNotFound exception occurs.
+ # Since scenario tests at the time of cleanUp() will not know
+ # how to handle it, we only return None.
return None
@classmethod