Commit 949bd166 authored by Jason R. Coombs's avatar Jason R. Coombs

Avoid removing packages imported from the root. Fixes #1383.

parent e1fb1747
In pkg_resources VendorImporter, avoid removing packages imported from the root.
......@@ -48,7 +48,7 @@ class VendorImporter:
# on later Python versions to cause relative imports
# in the vendor package to resolve the same modules
# as those going through this importer.
if sys.version_info > (3, 3):
if prefix and sys.version_info > (3, 3):
del sys.modules[extant]
return mod
except ImportError:
......
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