Skip to content
Browse files
Fixed unloading of python modules which were imported using "from X i…
…mport Y,Z".

Modules Y,Z have been missed by the import wrapper and the unloader did not remove the plugin completely/correctly.

git-svn-id: c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Jun 8, 2010
1 parent 4d6c310 commit d23617474bdc8f6354168ba1067b1393d15bafc5
Showing with 7 additions and 1 deletion.
  1. +7 −1 python/
@@ -298,7 +298,13 @@ def _import(name, globals={}, locals={}, fromlist=[], level=-1):
if package_name not in _plugin_modules:
_plugin_modules[package_name] = set()

# check the fromlist for additional modules (from X import Y,Z)
if fromlist:
for fromitem in fromlist:
frmod = module_name + "." + fromitem
if frmod in sys.modules:

return mod

__builtin__.__import__ = _import

0 comments on commit d236174

Please sign in to comment.