This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Unsupported provider

classification
Title: pipes.quote does not handle zero-length args correctly
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: eric.smith, jackdied, jjwiseman
Priority: normal Keywords:

Created on 2009-12-10 23:19 by jjwiseman, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg96225 - (view) Author: John Wiseman (jjwiseman) Date: 2009-12-10 23:19
In python 2.5.2, I believe pipes.quote gives the wrong result for zero-
length arguments.

>>> from pipes import quote
>>> args = ['arg1', '', 'arg3']
>>> print 'mycommand %s' % (' '.join(quote(arg) for arg in args))
mycommand arg1  arg3

I think the result should be something like
mycommand arg1 '' arg3
msg96230 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2009-12-11 00:17
In addition, quote is undocumented, although there is a test for it. It
should also be documented and/or have a docstring.
msg99836 - (view) Author: Jack Diederich (jackdied) * (Python committer) Date: 2010-02-22 21:28
fixed in r78339, will port to 2.6 maint and 3k.
History
Date User Action Args
2022-04-11 14:56:55adminsetgithub: 51725
2010-02-22 21:28:47jackdiedsetstatus: open -> closed

nosy: + jackdied
messages: + msg99836

resolution: accepted
2009-12-11 00:17:38eric.smithsetnosy: + eric.smith
messages: + msg96230
2009-12-10 23:19:04jjwisemancreate