From 7d44629c2e8003f5bbb87e9b697eec54b4cce793 Mon Sep 17 00:00:00 2001 From: Yong Sheng Gong Date: Mon, 21 Oct 2013 20:26:36 +0800 Subject: [PATCH] Replace a non-existing exception Closes-Bug: #1242662 Change-Id: Ie44023c0fd9ba1373ec6e62d9245884b9f719b7e --- neutron/api/extensions.py | 3 +-- neutron/common/exceptions.py | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/neutron/api/extensions.py b/neutron/api/extensions.py index c34188f4662..5919d839650 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 cb004a9cf6f..df49df8580b 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")