diff options
author | Ronan Lamy <ronan.lamy@gmail.com> | 2019-08-02 18:03:38 +0100 |
---|---|---|
committer | Ronan Lamy <ronan.lamy@gmail.com> | 2019-08-02 18:03:38 +0100 |
commit | e85a213f4b603b90ead7014092a610910418d79a (patch) | |
tree | e225e89eda45be45cd6a2e6cb298e91a3750b068 /lib-python/3/imp.py | |
parent | Fix v3.6.1 import so that the process described in stdlib-upgrade.txt works a... (diff) | |
download | pypy-e85a213f4b603b90ead7014092a610910418d79a.tar.gz pypy-e85a213f4b603b90ead7014092a610910418d79a.tar.bz2 pypy-e85a213f4b603b90ead7014092a610910418d79a.zip |
Update to git tag v3.6.9
Diffstat (limited to 'lib-python/3/imp.py')
-rw-r--r-- | lib-python/3/imp.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib-python/3/imp.py b/lib-python/3/imp.py index 781ff23d25..866464b245 100644 --- a/lib-python/3/imp.py +++ b/lib-python/3/imp.py @@ -203,8 +203,9 @@ def load_package(name, path): extensions = (machinery.SOURCE_SUFFIXES[:] + machinery.BYTECODE_SUFFIXES[:]) for extension in extensions: - path = os.path.join(path, '__init__'+extension) - if os.path.exists(path): + init_path = os.path.join(path, '__init__' + extension) + if os.path.exists(init_path): + path = init_path break else: raise ValueError('{!r} is not a package'.format(path)) |