Move the os.path hack
This commit is contained in:
1 parent
c88afb71c9
commit
873558a392
2 files changed
+13
-7
No files matched your search
@@ -424,13 +424,6 @@ def import_module(evaluator, import_names, sys_path):
|
||||
# further imports.
|
||||
parent_module = list(bases)[0]
|
||||
|
||||
# This is a huge exception, we follow a nested import
|
||||
# ``os.path``, because it's a very important one in Python
|
||||
# that is being achieved by messing with ``sys.modules`` in
|
||||
# ``os``.
|
||||
if import_names == ('os', 'path'):
|
||||
return parent_module.py__getattribute__('path')
|
||||
|
||||
try:
|
||||
method = parent_module.py__path__
|
||||
except AttributeError:
|
||||
|
||||
Reference in new issue
Block a user