diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-02-13 08:34:45 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-02-13 08:34:45 (GMT) |
commit | 07aa3ed372ee1ab5e7e9151f8b63ff78dd0b419c (patch) | |
tree | f7de122964c8c0d658cbf1b74c2dce90641466fa /Lib/imputil.py | |
parent | b8d6d73121855f30d8e3733552533ad8d29aa8e6 (diff) | |
download | cpython-07aa3ed372ee1ab5e7e9151f8b63ff78dd0b419c.zip cpython-07aa3ed372ee1ab5e7e9151f8b63ff78dd0b419c.tar.gz cpython-07aa3ed372ee1ab5e7e9151f8b63ff78dd0b419c.tar.bz2 |
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 8a49bb1..675a634 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) |