From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMf9s-0000sP-G6 for qemu-devel@nongnu.org; Tue, 04 Aug 2015 12:33:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMf9r-0007uT-2v for qemu-devel@nongnu.org; Tue, 04 Aug 2015 12:33:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMf9q-0007uI-UE for qemu-devel@nongnu.org; Tue, 04 Aug 2015 12:33:43 -0400 References: <1438679896-5077-1-git-send-email-armbru@redhat.com> <1438679896-5077-3-git-send-email-armbru@redhat.com> <87egjj83ec.fsf@blackfin.pond.sub.org> From: Eric Blake Message-ID: <55C0E965.1080105@redhat.com> Date: Tue, 4 Aug 2015 10:33:41 -0600 MIME-Version: 1.0 In-Reply-To: <87egjj83ec.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MejUOfs2HMvrg30sTSqfgH5i4Sj5KC9s7" Subject: Re: [Qemu-devel] [PATCH 02/26] qapi: Clean up cgen() and mcgen() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MejUOfs2HMvrg30sTSqfgH5i4Sj5KC9s7 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 08/04/2015 09:44 AM, Markus Armbruster wrote: > Markus Armbruster writes: >=20 >> 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 >> Reviewed-by: Eric Blake >> --- >> scripts/qapi-commands.py | 2 +- >> scripts/qapi.py | 19 ++++++++++++------- >> 2 files changed, 13 insertions(+), 8 deletions(-) >> -def mcgen(code, **kwds): >> - raw =3D cgen('\n'.join(code.split('\n')[1:-1]), **kwds) >> + raw =3D code % kwds >> + if indent_level: >> + indent =3D genindent(indent_level) >> + raw =3D re.subn("^.", indent + '\g<0>', raw, 0, re.MULTILINE)= >=20 > pylint wants us to use r'\g<0>'. If nothing else comes up, I'll fix > this up for my pull. >=20 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --MejUOfs2HMvrg30sTSqfgH5i4Sj5KC9s7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVwOllAAoJEKeha0olJ0NqOfUH/iWJA+0x+l4xITmEtjzQ2CGA qmBtTzH6Bc0YpSMunZTq2H4KKxrx201Xq/vsCWLZhh0jFbsvWHLSRbybwvNRAkza 45Kx7Zwma6W49QfcIL9FuCodGkwVh6j2OLZ2Zb+NjzjWHj1FvKsgOTyJdmPdbDPh gu7zkuzbA/P+F83vHKlVkxoO3JLh1dwhUhKu7OlWxmGm262nb22vjqi5z6pX90jA ANeV4ttNzRswE6/7eSVKff+DXKWJhC215xCnVEJrO7z1gZa6uPgyK9iPDSJM0XUh xk0KN6BbcGaOHlSOd+qIiSZoP8uDLbP6Uv07YsWbQhoEypYYFnqyYpxKiJk6LPQ= =sfGy -----END PGP SIGNATURE----- --MejUOfs2HMvrg30sTSqfgH5i4Sj5KC9s7--