summaryrefslogtreecommitdiff
path: root/spawn.py
diff options
context:
space:
mode:
Diffstat (limited to 'spawn.py')
-rw-r--r--spawn.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/spawn.py b/spawn.py
index 5dd415a2..53876880 100644
--- a/spawn.py
+++ b/spawn.py
@@ -173,7 +173,7 @@ def find_executable(executable, path=None):
os.environ['PATH']. Returns the complete filename or None if not found.
"""
if path is None:
- path = os.environ['PATH']
+ path = os.environ.get('PATH', os.defpath)
paths = path.split(os.pathsep)
base, ext = os.path.splitext(executable)