From: Peter Maydell Date: Tue, 20 Aug 2013 14:50:15 +0000 (+0100) Subject: scripts/qapi.py: Avoid syntax not supported by Python 2.4 X-Git-Tag: TizenStudio_2.0_p2.3~529 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af0f917d6ca5c03532fdbe05d815c6853b8b9c0d;p=sdk%2Femulator%2Fqemu.git scripts/qapi.py: Avoid syntax not supported by Python 2.4 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 Signed-off-by: Luiz Capitulino (cherry picked from commit 21e0043bada1a24ae2ba6cd0051e104c0cbf9634) Signed-off-by: Michael Roth --- 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)