summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2014-05-20 13:50:19 -0400
committerLuiz Capitulino <lcapitulino@redhat.com>2014-05-21 09:04:03 -0400
commit347888113020e874027cb200bb38aa0852e42839 (patch)
tree4aaeb260b28e6fa01dcb7fa2ff1fe87e34e2fd47
parent3b6959506831193f37cc830c8e111b437c0d1380 (diff)
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 <peter.maydell@linaro.org> Tested-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
-rw-r--r--scripts/qapi.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 0265b404dd..86e96089af 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,