]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Remove the rest references to exception.py
authorLiang Chen <cbjchen@cn.ibm.com>
Sun, 18 Aug 2013 12:48:49 +0000 (20:48 +0800)
committerLiang Chen <cbjchen@cn.ibm.com>
Mon, 26 Aug 2013 14:10:02 +0000 (22:10 +0800)
Remove the rest references to Oslo exception.py in Heat code base, so that Oslo
maintainer can go ahead and remove the openstack/common/exception.py file.

Change-Id: I19d325e2117f31a887c593e31b61e25729f7a053

heat/common/exception.py

index 74adf7c5bcbbd9463b36d9a7b38ee248381ca332..52972522398606a851cfe6b80d89c43a528219b0 100644 (file)
@@ -21,14 +21,9 @@ import functools
 import urlparse
 import sys
 
-from heat.openstack.common import exception
 from heat.openstack.common import log as logging
 
 
-NotFound = exception.NotFound
-Error = exception.Error
-InvalidContentType = exception.InvalidContentType
-
 _FATAL_EXCEPTION_FORMAT_ERRORS = False
 
 
@@ -342,3 +337,16 @@ class TemplateTooBig(HeatException):
 class EgressRuleNotAllowed(HeatException):
     message = _("Egress rules are only allowed when "
                 "Neutron is used and the 'VpcId' property is set.")
+
+
+class Error(Exception):
+    def __init__(self, message=None):
+        super(Error, self).__init__(message)
+
+
+class NotFound(Error):
+    pass
+
+
+class InvalidContentType(HeatException):
+    message = "Invalid content type %(content_type)s"