diff options
author | Jean-Paul Calderone <exarkun@divmod.com> | 2010-06-18 20:00:17 (GMT) |
---|---|---|
committer | Jean-Paul Calderone <exarkun@divmod.com> | 2010-06-18 20:00:17 (GMT) |
commit | b33f0c1ccdab9a774a644ff928c3663685d6fd20 (patch) | |
tree | bf9ef32be84aebc5f528f6682d8dfa97b48f464e /Lib/subprocess.py | |
parent | a37b7af4d787a53ad0dcbdedef0e95f8546d2e28 (diff) | |
download | cpython-b33f0c1ccdab9a774a644ff928c3663685d6fd20.zip cpython-b33f0c1ccdab9a774a644ff928c3663685d6fd20.tar.gz cpython-b33f0c1ccdab9a774a644ff928c3663685d6fd20.tar.bz2 |
Revert r60115
This revision introduced quoting for strings containing | based
on a misunderstanding of the commonly used quoting rules used
on Windows.
| is interpreted by cmd.exe, not by the MS C runtime argv initializer.
It only needs to be quoted if it is part of an argument passed through
cmd.exe.
See issue1300, issue7839, and issue8972.
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r-- | Lib/subprocess.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 115d07d..bdd116a 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -548,8 +548,8 @@ def list2cmdline(seq): 2) A string surrounded by double quotation marks is interpreted as a single argument, regardless of white space - or pipe characters contained within. A quoted string can be - embedded in an argument. + contained within. A quoted string can be embedded in an + argument. 3) A double quotation mark preceded by a backslash is interpreted as a literal double quotation mark. @@ -577,7 +577,7 @@ def list2cmdline(seq): if result: result.append(' ') - needquote = (" " in arg) or ("\t" in arg) or ("|" in arg) or not arg + needquote = (" " in arg) or ("\t" in arg) or not arg if needquote: result.append('"') |