Fix plugin load if previous (re)load failed.

This commit is contained in:
Valentin Lorentz 2013-05-10 17:55:56 +02:00
parent 1a6d4b64d2
commit 3570acff72

View File

@ -60,6 +60,7 @@ def loadPluginModule(name, ignoreDeprecation=False):
module = imp.load_module(name, *moduleInfo)
except:
sys.modules.pop(name, None)
sys.modules = filter(lambda x:not x.startwith(name + '.'), sys.modules)
raise
if 'deprecated' in module.__dict__ and module.deprecated:
if ignoreDeprecation: