scripts/qapi.py: Avoid syntax not supported by Python 2.4
PATCH 1/1 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 <[email protected]>
Signed-off-by Luiz Capitulino <[email protected]>
--- scripts/qapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/qapi.py +1 -1
@@ -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,
Signature · 1 line
1.9.0
Am 20.05.2014 20:29, schrieb Luiz Capitulino:
Quoted 16 lines
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 <[email protected]>Signed-off-by Luiz Capitulino <[email protected]>--- scripts/qapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/qapi.py +0
-0
scripts/qapi.py class QAPISchema: · line 122
Quoted 8 lines
scripts/qapi.py +1
-1@@ -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,
I have the same change applied locally, so
Tested-by Andreas Färber <[email protected]>
Thanks,
Andreas