From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Stefan Hajnoczi" <stefanha@gmail.com>,
"Erik Rull" <erik.rull@rdsoftware.de>,
qemu-stable@nongnu.org, "Andreas Färber" <afaerber@suse.de>,
"Luiz Capitulino" <lcapitulino@redhat.com>
Subject: [Qemu-devel] [PATCH] scripts/qapi.py: Avoid syntax not supported by Python 2.4
Date: Tue, 20 Aug 2013 15:50:15 +0100 [thread overview]
Message-ID: <1377010215-5470-1-git-send-email-peter.maydell@linaro.org> (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.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
I don't have an old python to test this on, but it works
OK with 2.7 and Erik said he'd tested the equivalent
change done by hand.
scripts/qapi.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 0ebea94..1069310 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -161,7 +161,7 @@ class QAPISchema:
def parse_schema(fp):
try:
schema = QAPISchema(fp)
- except QAPISchemaError as e:
+ except QAPISchemaError, e:
print >>sys.stderr, e
exit(1)
--
1.7.9.5
next reply other threads:[~2013-08-20 14:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-20 14:50 Peter Maydell [this message]
2013-08-20 15:43 ` [Qemu-devel] [PATCH] scripts/qapi.py: Avoid syntax not supported by Python 2.4 Luiz Capitulino
-- strict thread matches above, loose matches on Subject: below --
2014-05-20 18:29 Luiz Capitulino
2014-05-21 11:42 ` Andreas Färber
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=1377010215-5470-1-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=afaerber@suse.de \
--cc=erik.rull@rdsoftware.de \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=stefanha@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).