qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/4] tracetool: use Python 2.4-compatible except


From: Lluís Vilanova
Subject: Re: [Qemu-devel] [PATCH 1/4] tracetool: use Python 2.4-compatible exception handling syntax
Date: Fri, 27 Apr 2012 19:30:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Stefan Hajnoczi writes:

> 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 <address@hidden>
> Signed-off-by: Stefan Hajnoczi <address@hidden>

Reviewed-by: Lluís Vilanova <address@hidden>

> ---
>  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


-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth



reply via email to

[Prev in Thread] Current Thread [Next in Thread]