qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] trace: update qemu-trace-stap to Python 3


From: Daniel P . Berrangé
Subject: Re: [PATCH] trace: update qemu-trace-stap to Python 3
Date: Tue, 7 Jan 2020 11:50:20 +0000
User-agent: Mutt/1.12.1 (2019-06-15)

On Tue, Jan 07, 2020 at 11:24:38AM +0000, Stefan Hajnoczi wrote:
> qemu-trace-stap does not support Python 3 yet:
> 
>   $ scripts/qemu-trace-stap list path/to/qemu-system-x86_64
>   Traceback (most recent call last):
>     File "scripts/qemu-trace-stap", line 175, in <module>
>       main()
>     File "scripts/qemu-trace-stap", line 171, in main
>       args.func(args)
>     File "scripts/qemu-trace-stap", line 118, in cmd_list
>       print_probes(args.verbose, "*")
>     File "scripts/qemu-trace-stap", line 114, in print_probes
>       if line.startswith(prefix):
>   TypeError: startswith first arg must be bytes or a tuple of bytes, not str
> 
> Now that QEMU requires Python 3.5 or later we can switch to pure Python
> 3.  Use Popen()'s universal_newlines=True argument to treat stdout as
> text instead of binary.
> 
> Fixes: 62dd1048c0bd ("trace: add ability to do simple printf logging via 
> systemtap")
> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1787395
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
>  scripts/qemu-trace-stap | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Daniel P. Berrangé <address@hidden>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

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