Commit 16c7887f authored by Greg Stein's avatar Greg Stein

only put __path__ into package modules.

parent aa6049c4
...@@ -436,7 +436,7 @@ def _fs_import(dir, modname): ...@@ -436,7 +436,7 @@ def _fs_import(dir, modname):
pathname = _os_path_join(dir, modname) pathname = _os_path_join(dir, modname)
if _os_path_isdir(pathname): if _os_path_isdir(pathname):
values = { '__pkgdir__' : pathname } values = { '__pkgdir__' : pathname, '__path__' : [ pathname ] }
ispkg = 1 ispkg = 1
pathname = _os_path_join(pathname, '__init__') pathname = _os_path_join(pathname, '__init__')
else: else:
...@@ -609,7 +609,6 @@ class SysPathImporter(Importer): ...@@ -609,7 +609,6 @@ class SysPathImporter(Importer):
for dir in sys.path: for dir in sys.path:
result = _fs_import(dir, modname) result = _fs_import(dir, modname)
if result: if result:
result[2]['__path__'] = [ dir ] # backwards compat
return result return result
# not found # not found
......
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