summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorTim Golden <mail@timgolden.me.uk>2010-08-08 16:18:18 (GMT)
committerTim Golden <mail@timgolden.me.uk>2010-08-08 16:18:18 (GMT)
commit818afb55c9da56f370112e0b04dad66b8e067710 (patch)
tree49c39a73decd55f35d14b72d7ac94647f3a55406 /Lib/subprocess.py
parentab1280cd59245e9096218bc4321500076c2e128c (diff)
downloadcpython-818afb55c9da56f370112e0b04dad66b8e067710.zip
cpython-818afb55c9da56f370112e0b04dad66b8e067710.tar.gz
cpython-818afb55c9da56f370112e0b04dad66b8e067710.tar.bz2
Issue #2304: Add additional quotes when using cmd shell on Windows. Original patch from Gabriel Genellina
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 0009bcd..e3d18c1 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -829,7 +829,7 @@ class Popen(object):
startupinfo.dwFlags |= _subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = _subprocess.SW_HIDE
comspec = os.environ.get("COMSPEC", "cmd.exe")
- args = comspec + " /c " + args
+ args = comspec + " /c " + '"%s"' % args
if (_subprocess.GetVersion() >= 0x80000000 or
os.path.basename(comspec).lower() == "command.com"):
# Win9x, or using command.com on NT. We need to