diff options
author | Tim Golden <mail@timgolden.me.uk> | 2010-08-12 11:00:35 +0000 |
---|---|---|
committer | Tim Golden <mail@timgolden.me.uk> | 2010-08-12 11:00:35 +0000 |
commit | 8e4756c7635cda029e75d3c9ad6daefce3a707e6 (patch) | |
tree | 604cdd6ef75903485d946912cbbe50054fe0f6ab /Lib/subprocess.py | |
parent | b13a23639c9e2f20abbe331a0781a4c2ce9c03f7 (diff) | |
download | cpython-git-8e4756c7635cda029e75d3c9ad6daefce3a707e6.tar.gz |
#2304: fix incorporating Eric Smith's .format suggestion and tested on Ubuntu as well as Windows
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r-- | Lib/subprocess.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 395b7a3400..68de777644 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -853,8 +853,8 @@ class Popen(object): startupinfo.dwFlags |= _subprocess.STARTF_USESHOWWINDOW startupinfo.wShowWindow = _subprocess.SW_HIDE comspec = os.environ.get("COMSPEC", "cmd.exe") - args = comspec + " /c " + args - if (_subprocess.GetVersion() >= 0x80000000L or + args = '{} /c "{}"'.format (comspec, args) + if (_subprocess.GetVersion() >= 0x80000000 or os.path.basename(comspec).lower() == "command.com"): # Win9x, or using command.com on NT. We need to # use the w9xpopen intermediate program. For more |