mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +03:00
Do not raise an error if os.environ does not contain PATH
This commit is contained in:
parent
7e3bed6834
commit
5059e5c143
2
setup.py
2
setup.py
|
@ -243,6 +243,8 @@ def _find_include_dir(self, dirname, include):
|
||||||
|
|
||||||
|
|
||||||
def _cmd_exists(cmd):
|
def _cmd_exists(cmd):
|
||||||
|
if "PATH" not in os.environ:
|
||||||
|
return
|
||||||
return any(
|
return any(
|
||||||
os.access(os.path.join(path, cmd), os.X_OK)
|
os.access(os.path.join(path, cmd), os.X_OK)
|
||||||
for path in os.environ["PATH"].split(os.pathsep)
|
for path in os.environ["PATH"].split(os.pathsep)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user