mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Make sure failed loads of plugins don't prevent those plugins from later being loaded.
This commit is contained in:
parent
61e46c5049
commit
90112901f4
@ -81,7 +81,11 @@ def loadPluginModule(name, ignoreDeprecation=False):
|
||||
except ValueError: # We'd rather raise the ImportError, so we'll let go...
|
||||
pass
|
||||
moduleInfo = imp.find_module(name, pluginDirs)
|
||||
try:
|
||||
module = imp.load_module(name, *moduleInfo)
|
||||
except:
|
||||
del sys.modules[name]
|
||||
raise
|
||||
if 'deprecated' in module.__dict__ and module.deprecated:
|
||||
if ignoreDeprecation:
|
||||
log.warning('Deprecated plugin loaded: %s', name)
|
||||
|
Loading…
Reference in New Issue
Block a user