R. David Murray <rdmur...@bitdance.com> added the comment:

The actual bug here is that list2cmdline is called when shell=True and a list 
is passed.  This should not be done.  Instead, Popen should raise an TypeError 
(see issue 7839).

When calling Popen with shell=True, you should be passing in a string that is 
already correctly quoted.  This is how it works in Unix, and is how it should 
work in Windows as well.

So I agree with exarkun's comments in msg107679, and I think Gregory's fix in 
r60115 for issue 1300 was incorrect and that in fact the OP was correct that he 
did not understand what was happening (note that he did not report an actual 
bug, he just reported that the code looked wrong to him).

----------
nosy: +gregory.p.smith, r.david.murray
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> pending
superseder:  -> Popen should raise ValueError if pass a string when shell=False 
or a list when shell=True

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8972>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to