Re: [RFC PATCH] python: add __repr__ to ConsoleSocket to aid debugging

2020-12-08 Thread John Snow
On 12/7/20 4:35 PM, Willian Rampazzo wrote: We could use something more pythonic for this file. Instead of 3 string concatenations, my suggestion is to go with string formatting, like: s = "%s, logfile=%s, drain_thread=%s>" % (s, self._logfile, self._drain_thread) As str is immutable in Python

Re: [RFC PATCH] python: add __repr__ to ConsoleSocket to aid debugging

2020-12-07 Thread Willian Rampazzo
Em seg, 7 de dez de 2020 19:14, Philippe Mathieu-Daudé escreveu: > Hi Willian, > > On 12/7/20 10:35 PM, Willian Rampazzo wrote: > > On Mon, Dec 7, 2020 at 5:10 PM Alex Bennée > wrote: > >> > >> While attempting to debug some console weirdness I thought it would be > >> worth making it easier to

Re: [RFC PATCH] python: add __repr__ to ConsoleSocket to aid debugging

2020-12-07 Thread Philippe Mathieu-Daudé
Hi Willian, On 12/7/20 10:35 PM, Willian Rampazzo wrote: > On Mon, Dec 7, 2020 at 5:10 PM Alex Bennée wrote: >> >> While attempting to debug some console weirdness I thought it would be >> worth making it easier to see what it had inside. >> >> Signed-off-by: Alex Bennée >> --- >> python/qemu/c

Re: [RFC PATCH] python: add __repr__ to ConsoleSocket to aid debugging

2020-12-07 Thread Willian Rampazzo
On Mon, Dec 7, 2020 at 5:10 PM Alex Bennée wrote: > > While attempting to debug some console weirdness I thought it would be > worth making it easier to see what it had inside. > > Signed-off-by: Alex Bennée > --- > python/qemu/console_socket.py | 8 > 1 file changed, 8 insertions(+) >

Re: [RFC PATCH] python: add __repr__ to ConsoleSocket to aid debugging

2020-12-07 Thread John Snow
On 12/7/20 3:07 PM, Alex Bennée wrote: While attempting to debug some console weirdness I thought it would be worth making it easier to see what it had inside. Signed-off-by: Alex Bennée --- python/qemu/console_socket.py | 8 1 file changed, 8 insertions(+) diff --git a/python/qemu

[RFC PATCH] python: add __repr__ to ConsoleSocket to aid debugging

2020-12-07 Thread Alex Bennée
While attempting to debug some console weirdness I thought it would be worth making it easier to see what it had inside. Signed-off-by: Alex Bennée --- python/qemu/console_socket.py | 8 1 file changed, 8 insertions(+) diff --git a/python/qemu/console_socket.py b/python/qemu/console_so