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.

Author isoschiz
Recipients isoschiz
Date 2014-07-17.16:37:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1405615020.91.0.261812812224.issue21999@psf.upfronthosting.co.za>
In-reply-to
Content
Minimal testcase of the problem situation is tokenising (with posix mode on):

  ''),

Specifically, an empty string, followed by a non-word character, followed by a non-space character. In this case, the token buffer is empty and due to a missing check for (self.posix and quoted), an extra token is consumed and returned in the wrong order:

>>> s = shlex.shlex("'')abc", posix=True)
>>> s.get_token()
'abc'
>>> s.get_token()
')'
>>> s.get_token()
>>> 

I have patches to fix this issue in both default and 2.7. I've also checked there are no other occurrences of the same typo.
History
Date User Action Args
2014-07-17 16:37:00isoschizsetrecipients: + isoschiz
2014-07-17 16:37:00isoschizsetmessageid: <1405615020.91.0.261812812224.issue21999@psf.upfronthosting.co.za>
2014-07-17 16:37:00isoschizlinkissue21999 messages
2014-07-17 16:37:00isoschizcreate