From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 1/5] tracetool: use Python 2.4-compatible exception handling syntax
Date: Tue, 1 May 2012 20:28:34 +0100 [thread overview]
Message-ID: <1335900518-6730-2-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
In-Reply-To: <1335900518-6730-1-git-send-email-stefanha@linux.vnet.ibm.com>
The newer "except <exception-type> as <exception>:" syntax is not
supported by Python 2.4, we need to use "except <exception-type>,
<exception>:".
Tested all trace backends with Python 2.4.
Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Reviewed-by: Lluís Vilanova <vilanova@ac.upc.edu>
---
scripts/tracetool.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/tracetool.py b/scripts/tracetool.py
index cacfd99..c003cf6 100755
--- a/scripts/tracetool.py
+++ b/scripts/tracetool.py
@@ -70,7 +70,7 @@ def main(args):
try:
opts, args = getopt.getopt(args[1:], "", long_opts)
- except getopt.GetoptError as err:
+ except getopt.GetoptError, err:
error_opt(str(err))
check_backend = False
@@ -131,7 +131,7 @@ def main(args):
try:
tracetool.generate(sys.stdin, arg_format, arg_backend,
binary = binary, probe_prefix = probe_prefix)
- except tracetool.TracetoolError as e:
+ except tracetool.TracetoolError, e:
error_opt(str(e))
if __name__ == "__main__":
--
1.7.10
next prev parent reply other threads:[~2012-05-01 19:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-01 19:28 [Qemu-devel] [PULL 0/5] Tracing patches for 1.1 Stefan Hajnoczi
2012-05-01 19:28 ` Stefan Hajnoczi [this message]
2012-05-01 19:28 ` [Qemu-devel] [PATCH 2/5] tracetool: use Python 2.4-compatible __import__() arguments Stefan Hajnoczi
2012-05-01 19:28 ` [Qemu-devel] [PATCH 3/5] tracetool: avoid str.rpartition() Python 2.5 function Stefan Hajnoczi
2012-05-01 19:28 ` [Qemu-devel] [PATCH 4/5] tracetool: avoid pkgutil.iter_modules() Python 2.7 function Stefan Hajnoczi
2012-05-01 19:28 ` [Qemu-devel] [PATCH 5/5] configure: check for supported Python 2.x versions Stefan Hajnoczi
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=1335900518-6730-2-git-send-email-stefanha@linux.vnet.ibm.com \
--to=stefanha@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
/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).