mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Apparently, Python 3.3 does not like sys.modules to be reassigned.
This commit is contained in:
parent
9553798c90
commit
3b179ec304
@ -60,8 +60,9 @@ def loadPluginModule(name, ignoreDeprecation=False):
|
||||
module = imp.load_module(name, *moduleInfo)
|
||||
except:
|
||||
sys.modules.pop(name, None)
|
||||
sys.modules = dict(filter(lambda x:not x[0].startswith(name + '.'),
|
||||
sys.modules.items()))
|
||||
for key in sys.modules:
|
||||
if key.startwith(name + '.'):
|
||||
sys.modules.pop(key)
|
||||
raise
|
||||
if 'deprecated' in module.__dict__ and module.deprecated:
|
||||
if ignoreDeprecation:
|
||||
|
Loading…
Reference in New Issue
Block a user