scripts/qapi.py: Avoid syntax not supported by Python 2.4
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 20 Aug 2013 14:50:15 +0000 (15:50 +0100)
committerLuiz Capitulino <lcapitulino@redhat.com>
Tue, 20 Aug 2013 15:52:00 +0000 (11:52 -0400)
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 <peter.maydell@linaro.org>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
scripts/qapi.py

index 0ebea945bbadaeb62b4a8be5e8fd91ae6135cd59..1069310f8ddd5fa3878bcf333807e46abbfe64e5 100644 (file)
@@ -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)