Commit a76f5c03 authored by Jason R. Coombs's avatar Jason R. Coombs

Pop the module off the stack, preventing the 'Version' class from having a...

Pop the module off the stack, preventing the 'Version' class from having a different manifestation in packaging than in pkg_resources.

--HG--
branch : feature/issue-229
parent de5caaee
......@@ -28,8 +28,7 @@ class VendorImporter:
for prefix in self.search_path:
try:
__import__(prefix + target)
mod = sys.modules[prefix + target]
sys.modules[fullname] = mod
mod = sys.modules[fullname] = sys.modules.pop(prefix + target)
return mod
except ImportError:
pass
......
......@@ -28,8 +28,7 @@ class VendorImporter:
for prefix in self.search_path:
try:
__import__(prefix + target)
mod = sys.modules[prefix + target]
sys.modules[fullname] = mod
mod = sys.modules[fullname] = sys.modules.pop(prefix + target)
return mod
except ImportError:
pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment