[New-bugs-announce] [issue34530] distutils: find_executable() fails if the PATH environment variable is not set
STINNER Victor
report at bugs.python.org
Tue Aug 28 08:47:31 EDT 2018
New submission from STINNER Victor <vstinner at redhat.com>:
Example:
$ env -i ./python -c 'import distutils.spawn; print(distutils.spawn.find_executable("true"))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/vstinner/prog/python/master/Lib/distutils/spawn.py", line 176, in find_executable
path = os.environ['PATH']
File "/home/vstinner/prog/python/master/Lib/os.py", line 672, in __getitem__
raise KeyError(key) from None
KeyError: 'PATH'
Attached PR fixes the issue for the master branch.
----------
components: Library (Lib)
messages: 324245
nosy: vstinner
priority: normal
severity: normal
status: open
title: distutils: find_executable() fails if the PATH environment variable is not set
versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34530>
_______________________________________
More information about the New-bugs-announce
mailing list