From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBnGL-00026o-4R for qemu-devel@nongnu.org; Tue, 20 Aug 2013 10:50:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBnGE-0005hi-R4 for qemu-devel@nongnu.org; Tue, 20 Aug 2013 10:50:25 -0400 Received: from 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:1d0::1]:59355 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBnGE-0005hQ-Ko for qemu-devel@nongnu.org; Tue, 20 Aug 2013 10:50:18 -0400 From: Peter Maydell Date: Tue, 20 Aug 2013 15:50:15 +0100 Message-Id: <1377010215-5470-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] scripts/qapi.py: Avoid syntax not supported by Python 2.4 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Erik Rull , qemu-stable@nongnu.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= , Luiz Capitulino The Python "except Foo as x" syntax was only introduced in Python 2.6, but we aim to support Python 2.4 and later. Use the old-style "except Foo, x" syntax instead, thus fixing configure/compile on systems with older Python. Signed-off-by: Peter Maydell --- I don't have an old python to test this on, but it works OK with 2.7 and Erik said he'd tested the equivalent change done by hand. scripts/qapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 0ebea94..1069310 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -161,7 +161,7 @@ class QAPISchema: def parse_schema(fp): try: schema = QAPISchema(fp) - except QAPISchemaError as e: + except QAPISchemaError, e: print >>sys.stderr, e exit(1) -- 1.7.9.5