summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorSoren Hansen <soren@linux2go.dk>2011-03-28 20:36:07 +0200
committerSoren Hansen <soren@linux2go.dk>2011-03-28 20:36:07 +0200
commitdea3af64186ff204de7d5ca9852af267e648823e (patch)
tree517af014d3486b542128f3aad4d59ec4ad81d7d1 /nova/api
parent9786a19ec0bc5176cc01b56d473a977b85800977 (diff)
Remove now useless try/except block.
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/extensions.py24
1 files changed, 10 insertions, 14 deletions
diff --git a/nova/api/openstack/extensions.py b/nova/api/openstack/extensions.py
index 259d24a7d..e2f833d57 100644
--- a/nova/api/openstack/extensions.py
+++ b/nova/api/openstack/extensions.py
@@ -320,20 +320,16 @@ class ExtensionManager(object):
if file_ext.lower() == '.py' and not mod_name.startswith('_'):
mod = imp.load_source(mod_name, ext_path)
ext_name = mod_name[0].upper() + mod_name[1:]
- try:
- new_ext_class = getattr(mod, ext_name, None)
- if not new_ext_class:
- LOG.warn(_('Did not find expected name '
- '"%(ext_name)" in %(file)s'),
- { 'ext_name': ext_name,
- 'file': ext_path })
- continue
- new_ext = new_ext_class()
- self._check_extension(new_ext)
- self.extensions[new_ext.get_alias()] = new_ext
- except AttributeError as ex:
- LOG.exception(_("Exception loading extension: %s"),
- unicode(ex))
+ new_ext_class = getattr(mod, ext_name, None)
+ if not new_ext_class:
+ LOG.warn(_('Did not find expected name '
+ '"%(ext_name)" in %(file)s'),
+ { 'ext_name': ext_name,
+ 'file': ext_path })
+ continue
+ new_ext = new_ext_class()
+ self._check_extension(new_ext)
+ self.extensions[new_ext.get_alias()] = new_ext
class ResponseExtension(object):