]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Replace a non-existing exception
authorYong Sheng Gong <gongysh@unitedstack.com>
Mon, 21 Oct 2013 12:26:36 +0000 (20:26 +0800)
committerYong Sheng Gong <gongysh@unitedstack.com>
Tue, 12 Nov 2013 03:38:16 +0000 (11:38 +0800)
Closes-Bug: #1242662

Change-Id: Ie44023c0fd9ba1373ec6e62d9245884b9f719b7e

neutron/api/extensions.py
neutron/common/exceptions.py

index c34188f4662864ca8aec23980db51606858bf2bb..5919d8396508672416e05128f38c86e4084fccc8 100644 (file)
@@ -567,8 +567,7 @@ class ExtensionManager(object):
         LOG.info(_('Loaded extension: %s'), alias)
 
         if alias in self.extensions:
-            raise exceptions.Error(_("Found duplicate extension: %s") %
-                                   alias)
+            raise exceptions.DuplicatedExtension(alias=alias)
         self.extensions[alias] = ext
 
 
index cb004a9cf6f4e97983d2f4c0a90c401e4c3937f4..df49df8580b746836b557f7ce116466b108026bc 100644 (file)
@@ -301,3 +301,7 @@ class NetworkVlanRangeError(NeutronException):
 
 class NetworkVxlanPortRangeError(NeutronException):
     message = _("Invalid network VXLAN port range: '%(vxlan_range)s'")
+
+
+class DuplicatedExtension(NeutronException):
+    message = _("Found duplicate extension: %(alias)s")