Limit except clause to just ImportErrors when loading plugins.
This commit is contained in:
parent
d92aa05b5c
commit
061489f03a
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue