瀏覽代碼

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 <peter.maydell@linaro.org>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Peter Maydell 12 年之前
父節點
當前提交
21e0043bad
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scripts/qapi.py

+ 1 - 1
scripts/qapi.py

@@ -161,7 +161,7 @@ def get_expr(self, nested):
 def parse_schema(fp):
     try:
         schema = QAPISchema(fp)
-    except QAPISchemaError as e:
+    except QAPISchemaError, e:
         print >>sys.stderr, e
         exit(1)