From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYgPu-00023L-GI for qemu-devel@nongnu.org; Thu, 08 Dec 2011 11:01:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYgPt-0001w2-K7 for qemu-devel@nongnu.org; Thu, 08 Dec 2011 11:01:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYgPt-0001vx-DV for qemu-devel@nongnu.org; Thu, 08 Dec 2011 11:01:49 -0500 Message-ID: <4EE0E026.2060603@redhat.com> Date: Thu, 08 Dec 2011 17:04:54 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1322857256-14951-1-git-send-email-aliguori@us.ibm.com> <1322857256-14951-10-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1322857256-14951-10-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 09/18] qapi: allow a 'gen' key to suppress code generation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Peter Maydell , Stefan Hajnoczi , Jan Kiszka , qemu-devel@nongnu.org, Luiz Capitulino , Gerd Hoffman , Markus Armbruster Am 02.12.2011 21:20, schrieb Anthony Liguori: > Signed-off-by: Anthony Liguori > --- > scripts/qapi-commands.py | 1 + > scripts/qapi-types.py | 1 + > 2 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py > index f7def16..54d1f5d 100644 > --- a/scripts/qapi-commands.py > +++ b/scripts/qapi-commands.py > @@ -405,6 +405,7 @@ except os.error, e: > > exprs = parse_schema(sys.stdin) > commands = filter(lambda expr: expr.has_key('command'), exprs) > +commands = filter(lambda expr: not expr.has_key('gen'), commands) Might be confusing if someone uses something like gen = True. Shouldn't we better check the value instead of just existence? Kevin