qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 02/26] qapi: Clean up cgen() and mcgen()


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 02/26] qapi: Clean up cgen() and mcgen()
Date: Tue, 4 Aug 2015 10:33:41 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 08/04/2015 09:44 AM, Markus Armbruster wrote:
> Markus Armbruster <address@hidden> writes:
> 
>> Commit 05dfb26 added eatspace stripping to mcgen().  Move it to
>> cgen(), just in case somebody gets tempted to use cgen() directly
>> instead of via mcgen().
>>

>> Output doesn't change
>>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> Reviewed-by: Eric Blake <address@hidden>
>> ---
>>  scripts/qapi-commands.py |  2 +-
>>  scripts/qapi.py          | 19 ++++++++++++-------
>>  2 files changed, 13 insertions(+), 8 deletions(-)

>> -def mcgen(code, **kwds):
>> -    raw = cgen('\n'.join(code.split('\n')[1:-1]), **kwds)
>> +    raw = code % kwds
>> +    if indent_level:
>> +        indent = genindent(indent_level)
>> +        raw = re.subn("^.", indent + '\g<0>', raw, 0, re.MULTILINE)
> 
> pylint wants us to use r'\g<0>'.  If nothing else comes up, I'll fix
> this up for my pull.
> 

Goes to show that I've never (yet) used pylint. I probably ought to :)

Fine by me to make that tweak and keep my R-b.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]