From 57f5729df9694ed0916407e036751bc3552fb7fb Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 5 Mar 2022 21:31:21 +0100 Subject: [PATCH] bpo-45582: Don't fail if ENV_PATH is None in getpath.py In WASM / wasi context the PATH env var may be None. Signed-off-by: Christian Heimes --- Modules/getpath.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/getpath.py b/Modules/getpath.py index f84e6e8afaf62c..3a13bfdf491a14 100644 --- a/Modules/getpath.py +++ b/Modules/getpath.py @@ -277,7 +277,7 @@ def search_up(prefix, *landmarks, test=isfile): # executable path was provided in the config. real_executable = executable -if not executable and program_name: +if not executable and program_name and ENV_PATH: # Resolve names against PATH. # NOTE: The use_environment value is ignored for this lookup. # To properly isolate, launch Python with a full path.