diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-02-13 08:34:45 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-02-13 08:34:45 +0000 |
commit | 27e2a7206589255b443c6abdcae7761e0ded66f7 (patch) | |
tree | fd7b7085c8d3b189111e8a1524f5e1ca93637086 /Lib/imputil.py | |
parent | 9815183cf0201843468eb58fd83a5481c2f019cc (diff) | |
download | cpython-27e2a7206589255b443c6abdcae7761e0ded66f7.tar.gz |
Patch #685268: Consider a package's __path__ in imputil.
Will backport.
Diffstat (limited to 'Lib/imputil.py')
-rw-r--r-- | Lib/imputil.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/imputil.py b/Lib/imputil.py index 8a49bb14ff..675a634db3 100644 --- a/Lib/imputil.py +++ b/Lib/imputil.py @@ -552,6 +552,10 @@ class _FilesystemImporter(Importer): # This method is only used when we look for a module within a package. assert parent + for submodule_path in parent.__path__: + code = self._import_pathname(_os_path_join(submodule_path, modname), fqname) + if code is not None: + return code return self._import_pathname(_os_path_join(parent.__pkgdir__, modname), fqname) |