From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsusE-0006A6-FS for qemu-devel@nongnu.org; Thu, 14 May 2015 11:16:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsusA-0003Og-D5 for qemu-devel@nongnu.org; Thu, 14 May 2015 11:16:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsusA-0003OW-60 for qemu-devel@nongnu.org; Thu, 14 May 2015 11:16:30 -0400 Message-ID: <5554BC4A.2000309@redhat.com> Date: Thu, 14 May 2015 09:16:26 -0600 From: Eric Blake MIME-Version: 1.0 References: <1431329083-32543-1-git-send-email-armbru@redhat.com> <1431329083-32543-6-git-send-email-armbru@redhat.com> In-Reply-To: <1431329083-32543-6-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cqppEo0cXM2HJgiNLhNA6rOpojlq66q6V" Subject: Re: [Qemu-devel] [PATCH 5/9] qapi: Fix generators to report command line errors decently 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) --cqppEo0cXM2HJgiNLhNA6rOpojlq66q6V Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/11/2015 01:24 AM, Markus Armbruster wrote: > Report to stderr, prefix with the program name. Also reject > extra arguments. >=20 > Signed-off-by: Markus Armbruster > Reviewed-by: Eric Blake > --- > scripts/qapi.py | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > @@ -999,4 +999,8 @@ def parse_command_line(extra_options =3D "", extra_= long_options =3D []): > do_c =3D True > do_h =3D True > =20 > + if len(args) !=3D 0: > + print >>sys.stderr, "%s: too many arguments"% sys.argv[0] Spacing on both sides of %? Or even: print >>sys.stderr, sys.argv[0] + ": too many arguments" but trivial enough to keep R-b whatever you decide. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --cqppEo0cXM2HJgiNLhNA6rOpojlq66q6V 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/ iQEcBAEBCAAGBQJVVLxKAAoJEKeha0olJ0NqFXAIAIBB/twYDiaXjP9hloys07AY rqSMkufpexbJE/+3W8RNj3XtLc0H4xKYn4UeaFHCZwrmdAELpyf8+oIqd9yku1AD 78Tyxf05cRTUD92mJZbII82KB/NcOXp4BHsgEYDiymw5LVODSg0cUM+lfeLS5YT7 oLfoixZQ4ZgWHxPsR+9fgvsVhZcor6LNa3Hzdn3f2/USd/JTAprRJJE5TtLMO5e5 9Y90DF85yOchZWLV62vbovRuWjKVRSB24iMiVPZUnIcsEoeBDLdIHeUqZUiBs2pI fAgeRx9dYqmOYixaUyduh6kM+MkRm55etc5ft5hZsaGxAXCVF2VPrFovTg08HQ4= =KvVz -----END PGP SIGNATURE----- --cqppEo0cXM2HJgiNLhNA6rOpojlq66q6V--