提交 34788811 编写于 作者: L Luiz Capitulino

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: NPeter Maydell <peter.maydell@linaro.org>
Tested-by: NAndreas Färber <andreas.faerber@web.de>
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 3b695950
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册