[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] tracetool: use Python 2.5-compatible exception
From: |
Erik Rull |
Subject: |
Re: [Qemu-devel] [PATCH] tracetool: use Python 2.5-compatible exception handling syntax |
Date: |
Fri, 27 Apr 2012 09:27:35 +0200 (CEST) |
On April 26, 2012 at 7:02 PM Erik Rull <address@hidden> wrote:
>
>
>
> On April 25, 2012 at 11:42 AM Stefan Hajnoczi
<address@hidden>
> wrote:
>
> > The newer "except <exception-type> as <exception>:" syntax is not
> > supported by Python 2.5, we need to use "except <exception-type>,
> > <exception>:".
> >
> > Tested all trace backends with Python 2.5.6.
> >
> > Reported-by: Andreas Färber <address@hidden>
> > Signed-off-by: Stefan Hajnoczi <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
> >
> >
>
>
> Hi all,
>
> is this related to the error message when calling configure:
> ./configure --prefix= --target-list=x86_64-softmmu --disable-vnc-png
> --disable-vnc-jpeg --disable-vnc-tls --disable-vnc-sasl
--audio-card-list=
> --audio-drv-list= --enable-sdl --disable-xen --disable-brlapi
> --disable-bluez --disable-nptl --disable-curl --disable-guest-agent
> --disable-guest-base --disable-werror --disable-attr
>
>
> Error: invalid trace backend
> Please choose a supported trace backend.
>
>
> When trying to press tab after typing --tra appending to the line above,
I
> get:
>
> File "/home/erik/qemu-test/qemu/scripts/tracetool.py", line 73
> except getopt.GetoptError as err:
> ^
> SyntaxError: invalid syntax
> File "/home/erik/qemu-test/qemu/scripts/tracetool.py", line 73
> except getopt.GetoptError as err:
> ^
> SyntaxError: invalid syntax
>
> Any ideas?
> My Debian 4.0 has Python 2.4.4.
>
> Best regards,
>
> Erik
>
Hi all,
Finally I managed installing python 2.5 on my debian box - but it's not
better:
python -V reports now python 2.5
The error message when pressing <tab> is still the same:
And now?
Best regards,
Erik
Re: [Qemu-devel] [PATCH] tracetool: use Python 2.5-compatible exception handling syntax, Stefan Hajnoczi, 2012/04/27