From 20cf32e761fb9eaccc142415b389998896869263 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Wed, 8 Feb 2023 23:38:56 +0000 Subject: [PATCH] gh-101283: Fix use of unbound variable (GH-101712) --- Lib/subprocess.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/subprocess.py b/Lib/subprocess.py index fa527d50ebb44d..1f203bd00d3500 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1494,6 +1494,8 @@ def _execute_child(self, args, executable, preexec_fn, close_fds, raise FileNotFoundError('shell not found: neither %ComSpec% nor %SystemRoot% is set') if os.path.isabs(comspec): executable = comspec + else: + comspec = executable args = '{} /c "{}"'.format (comspec, args)