From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEzvb-0007LL-D9 for qemu-devel@nongnu.org; Thu, 29 Aug 2013 06:58:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEzvW-0005Gf-CV for qemu-devel@nongnu.org; Thu, 29 Aug 2013 06:58:15 -0400 Received: from mail6.webfaction.com ([74.55.86.74]:57299 helo=smtp.webfaction.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEzvW-0005Fa-6X for qemu-devel@nongnu.org; Thu, 29 Aug 2013 06:58:10 -0400 Message-ID: <521F2940.4080503@ctshepherd.com> Date: Thu, 29 Aug 2013 11:58:08 +0100 From: Charlie Shepherd MIME-Version: 1.0 References: <521F1AF0.5070400@ctshepherd.com> <521F1C1F.7000305@ctshepherd.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Remove Python 2.5 syntax from scripts/qapi-visit.py List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Anthony Liguori , qemu-devel , Michael Roth On 29/08/2013 11:14, Stefan Hajnoczi wrote: > On Thu, Aug 29, 2013 at 12:02 PM, Charlie Shepherd > wrote: >> On 29/08/2013 10:57, Charlie Shepherd wrote: >> >>> default_x86_64_rhel5: >>> >>> http://buildbot.b1-systems.de/qemu/builders/default_x86_64_rhel5/builds/684/steps/compile/logs/stdio >>>> File >>>> "/home/buildbot/slave-public/default_x86_64_rhel5/build/scripts/qapi-visit.py", >>>> line 23 >>>> full_name = name if not fn_prefix else "%s_%s" % (name, fn_prefix) >>>> ^ >>>> SyntaxError: invalid syntax >>>> make: *** [qapi-visit.h] Error 1 >>> This syntax was introduced in Python 2.5, patch to follow to convert >>> this to valid Python 2.4 syntax. >> >> The syntax `var = a if b else c` was added in Python 2.5, but QEMU has a >> >> minimum Python version of 2.4, which chokes on this syntax. This patch >> >> converts the new syntax to Python 2.4 compatible syntax. >> >> --- > Missing Signed-off-by: line. > > Also it looks like the email is double-spaced. Copy-paste or email > client issue? Thunderbird strikes again. I'll send a respin with git send-email. >> - full_name = name if not field_prefix else "%s_%s" % (field_prefix, >> name) >> >> + if not fn_prefix: >> >> + full_name = name >> >> + else: >> >> + full_name = "%s_%s" % (name, fn_prefix) > Careful, (field_prefix, name) were swapped to (name, fn_prefix). Good catch. Charlie