Blame 0005-scripts-qapi.py-Avoid-syntax-not-supported-by-Python.patch
|
|
298366 |
From d6dcfd69f8b2aa2cad79486bbadef7d51f7f4e7d Mon Sep 17 00:00:00 2001
|
|
|
298366 |
From: Peter Maydell <peter.maydell@linaro.org>
|
|
|
298366 |
Date: Tue, 20 Aug 2013 15:50:15 +0100
|
|
|
298366 |
Subject: [PATCH] scripts/qapi.py: Avoid syntax not supported by Python 2.4
|
|
|
298366 |
|
|
|
298366 |
The Python "except Foo as x" syntax was only introduced in
|
|
|
298366 |
Python 2.6, but we aim to support Python 2.4 and later.
|
|
|
298366 |
Use the old-style "except Foo, x" syntax instead, thus
|
|
|
298366 |
fixing configure/compile on systems with older Python.
|
|
|
298366 |
|
|
|
298366 |
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
|
|
298366 |
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
|
|
|
298366 |
(cherry picked from commit 21e0043bada1a24ae2ba6cd0051e104c0cbf9634)
|
|
|
298366 |
|
|
|
298366 |
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
|
|
|
298366 |
---
|
|
|
298366 |
scripts/qapi.py | 2 +-
|
|
|
298366 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
298366 |
|
|
|
298366 |
diff --git a/scripts/qapi.py b/scripts/qapi.py
|
|
|
298366 |
index 0ebea94..1069310 100644
|
|
|
298366 |
--- a/scripts/qapi.py
|
|
|
298366 |
+++ b/scripts/qapi.py
|
|
|
298366 |
@@ -161,7 +161,7 @@ class QAPISchema:
|
|
|
298366 |
def parse_schema(fp):
|
|
|
298366 |
try:
|
|
|
298366 |
schema = QAPISchema(fp)
|
|
|
298366 |
- except QAPISchemaError as e:
|
|
|
298366 |
+ except QAPISchemaError, e:
|
|
|
298366 |
print >>sys.stderr, e
|
|
|
298366 |
exit(1)
|
|
|
298366 |
|