From 714ac05a1996c0adf2740bce935f790d8824ea9e Mon Sep 17 00:00:00 2001 From: John Snow Date: Tue, 6 Oct 2020 19:58:11 -0400 Subject: python/qemu/console_socket.py: Clarify type of drain_thread Mypy needs just a little help to guess the type here. Signed-off-by: John Snow Reviewed-by: Kevin Wolf Message-id: 20201006235817.3280413-15-jsnow@redhat.com Signed-off-by: John Snow --- python/qemu/console_socket.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'python/qemu') diff --git a/python/qemu/console_socket.py b/python/qemu/console_socket.py index 3945682506..d4669c441d 100644 --- a/python/qemu/console_socket.py +++ b/python/qemu/console_socket.py @@ -41,10 +41,9 @@ class ConsoleSocket(socket.socket): if file: self._logfile = open(file, "w") self._open = True + self._drain_thread = None if drain: self._drain_thread = self._thread_start() - else: - self._drain_thread = None def _drain_fn(self): """Drains the socket and runs while the socket is open.""" -- cgit v1.2.3-55-g7522