Limit except clause to just ImportErrors when loading plugins.

This commit is contained in:
Lance Stout 2012-06-19 01:38:12 -07:00
parent d92aa05b5c
commit 061489f03a

View file

@ -84,7 +84,7 @@ def load_plugin(name, module=None):
module = 'sleekxmpp.plugins.%s' % name module = 'sleekxmpp.plugins.%s' % name
__import__(module) __import__(module)
mod = sys.modules[module] mod = sys.modules[module]
except: except ImportError:
module = 'sleekxmpp.features.%s' % name module = 'sleekxmpp.features.%s' % name
__import__(module) __import__(module)
mod = sys.modules[module] mod = sys.modules[module]
@ -103,7 +103,7 @@ def load_plugin(name, module=None):
# we can work around dependency issues. # we can work around dependency issues.
plugin.old_style = True plugin.old_style = True
register_plugin(plugin, name) register_plugin(plugin, name)
except: except ImportError:
log.exception("Unable to load plugin: %s", name) log.exception("Unable to load plugin: %s", name)