aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/multiprocessing/spawn.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/multiprocessing/spawn.py')
-rw-r--r--Lib/multiprocessing/spawn.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/multiprocessing/spawn.py b/Lib/multiprocessing/spawn.py
index 09f8a229d7c..f1af7709104 100644
--- a/Lib/multiprocessing/spawn.py
+++ b/Lib/multiprocessing/spawn.py
@@ -31,11 +31,13 @@ if sys.platform != 'win32':
WINSERVICE = False
else:
WINEXE = getattr(sys, 'frozen', False)
- WINSERVICE = sys.executable.lower().endswith("pythonservice.exe")
+ WINSERVICE = sys.executable and sys.executable.lower().endswith("pythonservice.exe")
def set_executable(exe):
global _python_exe
- if sys.platform == 'win32':
+ if exe is None:
+ _python_exe = exe
+ elif sys.platform == 'win32':
_python_exe = os.fsdecode(exe)
else:
_python_exe = os.fsencode(exe)