]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commitdiff
scripts/qapi.py: Avoid syntax not supported by Python 2.4
authorLuiz Capitulino <lcapitulino@redhat.com>
Tue, 20 May 2014 17:50:19 +0000 (13:50 -0400)
committerLuiz Capitulino <lcapitulino@redhat.com>
Wed, 21 May 2014 13:04:03 +0000 (09:04 -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.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
scripts/qapi.py

index 0265b404dd21bb168d638ca635d1e54978f93953..86e96089af6a42bfa3fbaa48e496c6dc8af37721 100644 (file)
@@ -116,7 +116,7 @@ class QAPISchema:
                     continue
                 try:
                     fobj = open(include_path, 'r')
-                except IOError as e:
+                except IOError, e:
                     raise QAPIExprError(expr_info,
                                         '%s: %s' % (e.strerror, include))
                 exprs_include = QAPISchema(fobj, include, self.include_hist,