Skip to content

Commit 20cf32e

Browse files
authored
gh-101283: Fix use of unbound variable (GH-101712)
1 parent 23751ed commit 20cf32e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/subprocess.py

+2
Original file line numberDiff line numberDiff line change
@@ -1494,6 +1494,8 @@ def _execute_child(self, args, executable, preexec_fn, close_fds,
14941494
raise FileNotFoundError('shell not found: neither %ComSpec% nor %SystemRoot% is set')
14951495
if os.path.isabs(comspec):
14961496
executable = comspec
1497+
else:
1498+
comspec = executable
14971499

14981500
args = '{} /c "{}"'.format (comspec, args)
14991501

0 commit comments

Comments
 (0)