Skip to content

Commit

Permalink
sys.modules is a dict, not a list.
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed May 10, 2013
1 parent e787f33 commit ee1d873
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugin.py
Expand Up @@ -60,7 +60,8 @@ def loadPluginModule(name, ignoreDeprecation=False):
module = imp.load_module(name, *moduleInfo)
except:
sys.modules.pop(name, None)
sys.modules = filter(lambda x:not x.startswith(name + '.'), sys.modules)
sys.modules = filter(lambda x:not x[0].startswith(name + '.'),
sys.modules.items())
raise
if 'deprecated' in module.__dict__ and module.deprecated:
if ignoreDeprecation:
Expand Down

0 comments on commit ee1d873

Please sign in to comment.