summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/subprocess.py6
-rw-r--r--Lib/test/test_subprocess.py2
2 files changed, 3 insertions, 5 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('"')
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index a858c40..b3e3e41 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -486,8 +486,6 @@ class ProcessTestCase(BaseTestCase):
'"a\\\\b\\ c" d e')
self.assertEqual(subprocess.list2cmdline(['ab', '']),
'ab ""')
- self.assertEqual(subprocess.list2cmdline(['echo', 'foo|bar']),
- 'echo "foo|bar"')
def test_poll(self):