Merge pull request #4853 from StevenHessing/noddos
[feed/packages.git] / lang / python / python3 / patches / 008-fix-distutils-path-creation.patch
1 --- a/Lib/imp.py
2 +++ b/Lib/imp.py
3 @@ -203,8 +203,9 @@ def load_package(name, path):
4 extensions = (machinery.SOURCE_SUFFIXES[:] +
5 machinery.BYTECODE_SUFFIXES[:])
6 for extension in extensions:
7 - path = os.path.join(path, '__init__'+extension)
8 - if os.path.exists(path):
9 + init_path = os.path.join(path, '__init__'+extension)
10 + if os.path.exists(init_path):
11 + path = init_path
12 break
13 else:
14 raise ValueError('{!r} is not a package'.format(path))