aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-04-25 10:39:42 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-05-01 20:15:28 +0100
commit662da3854e3f490223373b40afdcfcc339d14aa5 (patch)
treea680cc4e48038d2b01dcac2c8592ef9348005ab2 /scripts
parentb754e4fc1e8e68af975c545c38ebc3b001ebc98f (diff)
downloadqemu-662da3854e3f490223373b40afdcfcc339d14aa5.zip
qemu-662da3854e3f490223373b40afdcfcc339d14aa5.tar.gz
qemu-662da3854e3f490223373b40afdcfcc339d14aa5.tar.bz2
tracetool: use Python 2.4-compatible exception handling syntax
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/tracetool.py4
1 files 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__":