From: Steve Dower Date: Wed, 8 Feb 2023 23:38:56 +0000 (+0000) Subject: gh-101283: Fix use of unbound variable (GH-101712) X-Git-Tag: v3.12.0a6~209 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=20cf32e761fb9eaccc142415b389998896869263;p=thirdparty%2FPython%2Fcpython.git gh-101283: Fix use of unbound variable (GH-101712) --- diff --git a/Lib/subprocess.py b/Lib/subprocess.py index fa527d50ebb4..1f203bd00d35 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1494,6 +1494,8 @@ class Popen: 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)