From: Luiz Capitulino Date: Tue, 20 May 2014 17:50:19 +0000 (-0400) Subject: scripts/qapi.py: Avoid syntax not supported by Python 2.4 X-Git-Tag: v2.1.0-rc0~110^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=347888113020e874027cb200bb38aa0852e42839;p=thirdparty%2Fqemu.git 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. Reported-by: Peter Maydell Tested-by: Andreas Färber Signed-off-by: Luiz Capitulino --- diff --git a/scripts/qapi.py b/scripts/qapi.py index 0265b404dd2..86e96089af6 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -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,