Fix for bug #1634343: allow specifying empty arguments on Windows

This commit is contained in:
Peter Astrand 2007-01-13 22:35:35 +00:00
parent 2be9d43c18
commit 10514a70ac
2 changed files with 3 additions and 1 deletions

View File

@ -499,7 +499,7 @@ def list2cmdline(seq):
if result:
result.append(' ')
needquote = (" " in arg) or ("\t" in arg)
needquote = (" " in arg) or ("\t" in arg) or arg == ""
if needquote:
result.append('"')

View File

@ -430,6 +430,8 @@ class ProcessTestCase(unittest.TestCase):
'"a\\\\b c" d e')
self.assertEqual(subprocess.list2cmdline(['a\\\\b\\ c', 'd', 'e']),
'"a\\\\b\\ c" d e')
self.assertEqual(subprocess.list2cmdline(['ab', '']),
'ab ""')
def test_poll(self):