From 0af8a5dbaf73060c9100685bb5d3af609dad21da Mon Sep 17 00:00:00 2001 From: ricolin Date: Mon, 23 Nov 2015 23:38:52 +0800 Subject: [PATCH] Use EntityNotFound as super class for exceptions. For exception which showing not found message, we change the super class to EntityNotFound in order to categorize exception Change-Id: I0e5bc9ed1254a596240044a23cb7ab59f36de7cb Closes-Bug: #1515603 --- heat/common/exception.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/heat/common/exception.py b/heat/common/exception.py index d1e6181eb..70692c274 100644 --- a/heat/common/exception.py +++ b/heat/common/exception.py @@ -191,12 +191,12 @@ class InvalidSchemaError(HeatException): msg_fmt = _("%(message)s") -class ResourceNotFound(HeatException): +class ResourceNotFound(EntityNotFound): msg_fmt = _("The Resource (%(resource_name)s) could not be found " "in Stack %(stack_name)s.") -class SnapshotNotFound(HeatException): +class SnapshotNotFound(EntityNotFound): msg_fmt = _("The Snapshot (%(snapshot)s) for Stack (%(stack)s) " "could not be found.") @@ -214,8 +214,8 @@ class ResourceNotAvailable(HeatException): msg_fmt = _("The Resource (%(resource_name)s) is not available.") -class WatchRuleNotFound(HeatException): - '''Keep this for AWS compatiblility.''' +class WatchRuleNotFound(EntityNotFound): + """Keep this for AWS compatiblility.""" msg_fmt = _("The Watch Rule (%(watch_name)s) could not be found.")