Charles Daffern added the comment:
It's definitely a corner case (in argv[0] position + is keyword), but here's an
example:
>>> import subprocess
>>> import shlex
>>> subprocess.call(shlex.quote("done"), shell=True)
/bin/sh: 1: Syntax error: "done" unexpected
2
The expected output of this would be:
/bin/sh: 1: done: not found
127
This would be the output if shlex.quote("done") returned "'done'" or r'\done'
or any other combination of escaped/quoted characters where the keyword would
otherwise be.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue26124>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com