diff --git a/neutron/api/extensions.py b/neutron/api/extensions.py index c34188f466..5919d83965 100644 --- a/neutron/api/extensions.py +++ b/neutron/api/extensions.py @@ -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 diff --git a/neutron/common/exceptions.py b/neutron/common/exceptions.py index cb004a9cf6..df49df8580 100644 --- a/neutron/common/exceptions.py +++ b/neutron/common/exceptions.py @@ -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")