From: "Alex Bennée" <alex.bennee@linaro.org>
To: peter.maydell@linaro.org
Cc: "Eduardo Habkost" <ehabkost@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
qemu-devel@nongnu.org, "Willian Rampazzo" <willianr@redhat.com>,
"Cleber Rosa" <crosa@redhat.com>, "John Snow" <jsnow@redhat.com>
Subject: [PULL 05/11] python: add __repr__ to ConsoleSocket to aid debugging
Date: Wed, 16 Dec 2020 16:48:21 +0000 [thread overview]
Message-ID: <20201216164827.24457-6-alex.bennee@linaro.org> (raw)
In-Reply-To: <20201216164827.24457-1-alex.bennee@linaro.org>
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 <alex.bennee@linaro.org>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20201210190417.31673-6-alex.bennee@linaro.org>
diff --git a/python/qemu/console_socket.py b/python/qemu/console_socket.py
index f060d79e06..ac21130e44 100644
--- a/python/qemu/console_socket.py
+++ b/python/qemu/console_socket.py
@@ -45,6 +45,13 @@ class ConsoleSocket(socket.socket):
if drain:
self._drain_thread = self._thread_start()
+ def __repr__(self) -> str:
+ s = super().__repr__()
+ s = s.rstrip(">")
+ s = "%s, logfile=%s, drain_thread=%s>" % (s, self._logfile,
+ self._drain_thread)
+ return s
+
def _drain_fn(self) -> None:
"""Drains the socket and runs while the socket is open."""
while self._open:
--
2.20.1
next prev parent reply other threads:[~2020-12-16 17:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 16:48 [PULL 00/11] testing and configure updates Alex Bennée
2020-12-16 16:48 ` [PULL 01/11] configure: include moxie-softmmu in deprecated_targets_list Alex Bennée
2020-12-16 16:48 ` [PULL 02/11] gitlab: include aarch64-softmmu and ppc64-softmmu cross-system-build Alex Bennée
2020-12-16 16:48 ` [PULL 03/11] configure: move gettext detection to meson.build Alex Bennée
2020-12-16 16:48 ` [PULL 04/11] configure: add --without-default-features Alex Bennée
2020-12-16 16:48 ` Alex Bennée [this message]
2020-12-16 16:48 ` [PULL 06/11] gitlab: move --without-default-devices build from Travis Alex Bennée
2020-12-16 16:48 ` [PULL 07/11] gitlab: add --without-default-features build Alex Bennée
2020-12-16 16:48 ` [PULL 08/11] tests/tcg: build tests with -Werror Alex Bennée
2020-12-16 16:48 ` [PULL 09/11] gitlab-CI: Test 32-bit builds with the fedora-i386-cross container Alex Bennée
2020-12-16 16:48 ` [PULL 10/11] tests/docker: Remove the remainders of debian9 containers from the Makefile Alex Bennée
2020-12-16 16:48 ` [PULL 11/11] tests: update for rename of CentOS8 PowerTools repo Alex Bennée
2020-12-16 18:23 ` [PULL 00/11] testing and configure updates Alex Bennée
2020-12-16 18:57 ` Peter Maydell
2020-12-17 8:20 ` Alex Bennée
2020-12-17 9:40 ` Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201216164827.24457-6-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=crosa@redhat.com \
--cc=ehabkost@redhat.com \
--cc=jsnow@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=willianr@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).