From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ysuy4-0000SF-QI for qemu-devel@nongnu.org; Thu, 14 May 2015 11:22:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ysuy0-0007ch-48 for qemu-devel@nongnu.org; Thu, 14 May 2015 11:22:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ysuxz-0007cc-R6 for qemu-devel@nongnu.org; Thu, 14 May 2015 11:22:32 -0400 Message-ID: <5554BDB4.5030102@redhat.com> Date: Thu, 14 May 2015 09:22:28 -0600 From: Eric Blake MIME-Version: 1.0 References: <1431329083-32543-1-git-send-email-armbru@redhat.com> <1431329083-32543-7-git-send-email-armbru@redhat.com> In-Reply-To: <1431329083-32543-7-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3E4rkTsglKtVBfcvLaLWlqD1WKB0V9JaQ" Subject: Re: [Qemu-devel] [PATCH 6/9] qapi: Turn generators' mandatory option -i into an argument 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) --3E4rkTsglKtVBfcvLaLWlqD1WKB0V9JaQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/11/2015 01:24 AM, Markus Armbruster wrote: > Mandatory option is silly, and the error handling is missing: the > programs crash when -i isn't supplied. Make it an argument, and check > it properly. >=20 > Signed-off-by: Markus Armbruster > --- > Makefile | 14 +++++++------- > docs/qapi-code-gen.txt | 10 +++++----- > scripts/qapi.py | 12 +++++------- > tests/Makefile | 8 ++++---- > 4 files changed, 21 insertions(+), 23 deletions(-) >=20 > @@ -999,8 +996,9 @@ 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] > + if len(args) !=3D 1: > + print >>sys.stderr, "%s: need exactly one argument" % sys.argv= [0] Hmm, might be affected by resolution of my review comments on 5/9; but shouldn't affect the review. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --3E4rkTsglKtVBfcvLaLWlqD1WKB0V9JaQ 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/ iQEcBAEBCAAGBQJVVL20AAoJEKeha0olJ0Nq/wAH/AvoJcxy5lGqMhClNAu9AI6E RA1v9ACpbdfUtMiHEOn85vpPQrsjIp/4X5CMIqOVNUiI1RqGOzyh8n2QLjnnHUO+ hZobTvtkAOSgni2ZEXSEDECDd+eASI9vdgYYFf1+pjmYsKocrywKfCh5YshWhIOT svJsYHBobvDpcas1IOm954kZBpNUQTTE0hv7aCCbH0XvOzMbXM7ddiD0PhLyxjfM bxxg2Fxi1ZkuZfsmezOyUuy7x1qCA25gI9sOlCGwSQ0pJLg+XqGVNZpIj076OBbP cayENPGY+qJW81YWoDmcy4U1XL0zXt/tw+ndxXU6Mkc1raRaDDxJVZ0vwdKZd20= =MYtF -----END PGP SIGNATURE----- --3E4rkTsglKtVBfcvLaLWlqD1WKB0V9JaQ--