summaryrefslogtreecommitdiffstats
path: root/python/qemu
diff options
context:
space:
mode:
authorJohn Snow2020-10-07 01:58:11 +0200
committerJohn Snow2020-10-20 15:37:57 +0200
commit714ac05a1996c0adf2740bce935f790d8824ea9e (patch)
tree34c4beb90b1a662120ac60e8a622de8a65bc81e5 /python/qemu
parentpython/qemu/console_socket.py: fix typing of settimeout (diff)
downloadqemu-714ac05a1996c0adf2740bce935f790d8824ea9e.tar.gz
qemu-714ac05a1996c0adf2740bce935f790d8824ea9e.tar.xz
qemu-714ac05a1996c0adf2740bce935f790d8824ea9e.zip
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 <jsnow@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-id: 20201006235817.3280413-15-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'python/qemu')
-rw-r--r--python/qemu/console_socket.py3
1 files changed, 1 insertions, 2 deletions
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."""