From 061489f03ad889d85d556b94a41ba05724e54f9c Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 19 Jun 2012 01:38:12 -0700 Subject: Limit except clause to just ImportErrors when loading plugins. --- sleekxmpp/plugins/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sleekxmpp/plugins/base.py b/sleekxmpp/plugins/base.py index 5a298b72..337db2db 100644 --- a/sleekxmpp/plugins/base.py +++ b/sleekxmpp/plugins/base.py @@ -84,7 +84,7 @@ def load_plugin(name, module=None): module = 'sleekxmpp.plugins.%s' % name __import__(module) mod = sys.modules[module] - except: + except ImportError: module = 'sleekxmpp.features.%s' % name __import__(module) mod = sys.modules[module] @@ -103,7 +103,7 @@ def load_plugin(name, module=None): # we can work around dependency issues. plugin.old_style = True register_plugin(plugin, name) - except: + except ImportError: log.exception("Unable to load plugin: %s", name) -- cgit v1.2.3