]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
only put __path__ into package modules.
authorGreg Stein <gstein@lyra.org>
Sat, 20 Nov 1999 11:39:00 +0000 (11:39 +0000)
committerGreg Stein <gstein@lyra.org>
Sat, 20 Nov 1999 11:39:00 +0000 (11:39 +0000)
Lib/imputil.py

index 04344e0203d75c8baf1ff497e8726ab2f07d5a66..dd8c95cef9687d78912b80d847024f20edbd8a5d 100644 (file)
@@ -436,7 +436,7 @@ def _fs_import(dir, modname):
 
   pathname = _os_path_join(dir, modname)
   if _os_path_isdir(pathname):
-    values = { '__pkgdir__' : pathname }
+    values = { '__pkgdir__' : pathname, '__path__' : [ pathname ] }
     ispkg = 1
     pathname = _os_path_join(pathname, '__init__')
   else:
@@ -609,7 +609,6 @@ class SysPathImporter(Importer):
     for dir in sys.path:
       result = _fs_import(dir, modname)
       if result:
-        result[2]['__path__'] = [ dir ]                # backwards compat
         return result
 
     # not found