[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [python-virtinst PATCH] Don't support comments in parsed parameters



On 03/11/2013 11:04 AM, Martin Kletzander wrote:
> Until now, when virtinst was parsing parameters, '#' were used as
> starts of a comment, '\' as escape strings etc. due to the use of
> shlex.  The use of '\' is predictable (e.g. filename with a ',' in
> it), but the '#' is usually escaped in shell only.  Also, even when
> not escaped, shlex is not fully compatible with some syntax rules for
> parsing '#'.
> 
> For example '#' in 'echo asdf#fdsa' will not be used as a comment in
> bash (there is no whitespace in front of the '#'), but in our '--disk
> name#something.img' (parsed using shlex), it will be used as a comment
> even though it is not expected from the user.
> 
> Removing '#' (the only character) from shlex.commenters disables all
> similar comments, which is desired as users won't be trying to use
> comments to comment out parts of parameters.
> 
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=916878
> ---
> I'm pushing this as a 'trivial'.
> 

ACK

Thanks,
Cole


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]