[issue10618] regression in subprocess.call() command quoting

Benjamin Peterson report at bugs.python.org
Sat Dec 4 03:21:37 CET 2010


Benjamin Peterson <benjamin at python.org> added the comment:

2010/12/3 Georg Brandl <report at bugs.python.org>:
>
> Georg Brandl <georg at python.org> added the comment:
>
> In util.system(), Mercurial adds its own pair of quotes:
>
>    if os.name == 'nt':
>        cmd = '"%s"' % cmd
>
> That will result in one level of quoting too much.
>
> Now it seems unfortunate that this change was done in a minor version.
> It is definitely a bug fix, but one that many users have already worked around, probably in the same way as Mercurial.
>
> Possible ways to resolve:
>
> * make addition of quotes Python-version-specific in Mercurial
> * revert to old behavior in Python 2.7.2 (ugly)
> * add a check for quotes around the string in Python 2.7.2, and refrain from adding another set of quotes

I think we should just leave it alone. If it change the behavior again
in 2.7.2, it'll be even more consistent than before.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10618>
_______________________________________


More information about the Python-bugs-list mailing list