From: Stefan Hajnoczi Date: Wed, 25 Apr 2012 09:39:42 +0000 (+0100) Subject: tracetool: use Python 2.4-compatible exception handling syntax X-Git-Tag: v1.1-rc0~2^2~4 X-Git-Url: https://git.proxmox.com/?p=qemu.git;a=commitdiff_plain;h=662da3854e3f490223373b40afdcfcc339d14aa5 tracetool: use Python 2.4-compatible exception handling syntax The newer "except as :" syntax is not supported by Python 2.4, we need to use "except , :". Tested all trace backends with Python 2.4. Reported-by: Andreas Färber Signed-off-by: Stefan Hajnoczi Reviewed-by: Lluís Vilanova --- diff --git a/scripts/tracetool.py b/scripts/tracetool.py index cacfd99b6..c003cf69e 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__":