summaryrefslogtreecommitdiff
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorTim Golden <mail@timgolden.me.uk>2010-08-12 11:00:35 +0000
committerTim Golden <mail@timgolden.me.uk>2010-08-12 11:00:35 +0000
commit8e4756c7635cda029e75d3c9ad6daefce3a707e6 (patch)
tree604cdd6ef75903485d946912cbbe50054fe0f6ab /Lib/subprocess.py
parentb13a23639c9e2f20abbe331a0781a4c2ce9c03f7 (diff)
downloadcpython-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.py4
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