From d4a6fe8f4967626b9aac745268bb212f134fd1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Tue, 6 Aug 2019 16:18:56 +0200 Subject: [PATCH] Fix bug where _unblock() would fail on a stopped thread --- pipe_io_server/pipe_writer_thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipe_io_server/pipe_writer_thread.py b/pipe_io_server/pipe_writer_thread.py index 822c868..b8e217f 100644 --- a/pipe_io_server/pipe_writer_thread.py +++ b/pipe_io_server/pipe_writer_thread.py @@ -43,6 +43,6 @@ class PipeWriterThread(Thread): def _unblock(self): self._write_queue.push_front(None) - with suppress(OSError): + with suppress(OSError, TypeError): while read(self._drain_fd, 65536): pass