From 55a5e17d19fecb6a7af85a1a9d44304e5fcb19c7 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sun, 6 Mar 2022 21:49:27 +0200 Subject: [PATCH] bpo-45582: Don't fail if ENV_PATH is None in getpath.py (GH-31699) --- Modules/getpath.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/getpath.py b/Modules/getpath.py index f84e6e8afaf..3a13bfdf491 100644 --- a/Modules/getpath.py +++ b/Modules/getpath.py @@ -277,7 +277,7 @@ elif os_name == 'darwin': # 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.