[PULL,2/3] scripts/qapi.py: Avoid syntax not supported by Python 2.4
diff mbox

Message ID 1400766840-20726-3-git-send-email-lcapitulino@redhat.com
State New
Headers show

Commit Message

Luiz Capitulino May 22, 2014, 1:53 p.m. UTC
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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff mbox

diff --git a/scripts/qapi.py b/scripts/qapi.py
index 0265b40..86e9608 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -116,7 +116,7 @@  class QAPISchema:
                     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,