New submission from STINNER Victor <vstin...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue34530> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com