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

This commit is contained in:
Peter Astrand 2007-01-13 22:37:11 +00:00
parent 4347c135ce
commit 29794ecd43
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):