From: Luiz Capitulino <lcapitulino@redhat.com>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: peter.maydell@linaro.org, vilanova@ac.upc.edu, armbru@redhat.com
Subject: [Qemu-devel] [PATCH] scripts/qapi.py: Avoid syntax not supported by Python 2.4
Date: Tue, 20 May 2014 14:29:29 -0400 [thread overview]
Message-ID: <20140520142929.37e2cb7f@redhat.com> (raw)
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>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
scripts/qapi.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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:
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,
--
1.9.0
next reply other threads:[~2014-05-20 18:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-20 18:29 Luiz Capitulino [this message]
2014-05-21 11:42 ` [Qemu-devel] [PATCH] scripts/qapi.py: Avoid syntax not supported by Python 2.4 Andreas Färber
-- strict thread matches above, loose matches on Subject: below --
2013-08-20 14:50 Peter Maydell
2013-08-20 15:43 ` Luiz Capitulino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140520142929.37e2cb7f@redhat.com \
--to=lcapitulino@redhat.com \
--cc=armbru@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=vilanova@ac.upc.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.