From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YswBU-0007mW-HP for qemu-devel@nongnu.org; Thu, 14 May 2015 12:40:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YswBP-0007Me-2o for qemu-devel@nongnu.org; Thu, 14 May 2015 12:40:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YswBO-0007MB-Ro for qemu-devel@nongnu.org; Thu, 14 May 2015 12:40:27 -0400 From: Markus Armbruster References: <1431329083-32543-1-git-send-email-armbru@redhat.com> <1431329083-32543-6-git-send-email-armbru@redhat.com> <5554BC4A.2000309@redhat.com> Date: Thu, 14 May 2015 18:40:21 +0200 In-Reply-To: <5554BC4A.2000309@redhat.com> (Eric Blake's message of "Thu, 14 May 2015 09:16:26 -0600") Message-ID: <87zj57ru2y.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain 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: Eric Blake Cc: qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com Eric Blake writes: > On 05/11/2015 01:24 AM, Markus Armbruster wrote: >> Report to stderr, prefix with the program name. Also reject >> extra arguments. >> >> Signed-off-by: Markus Armbruster >> Reviewed-by: Eric Blake >> --- >> scripts/qapi.py | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> > >> @@ -999,4 +999,8 @@ def parse_command_line(extra_options = "", extra_long_options = []): >> do_c = True >> do_h = True >> >> + if len(args) != 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. Spacing tidied up, thanks!