From cae78a029eb38d051864403db1f0e27fdc127791 Mon Sep 17 00:00:00 2001 From: Austin Macdonald Date: Fri, 10 May 2024 12:34:28 -0500 Subject: [PATCH] Don't write empty data --- src/duct.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/duct.py b/src/duct.py index bc44a45f..8d2c67ce 100755 --- a/src/duct.py +++ b/src/duct.py @@ -232,7 +232,8 @@ def fileno(self): def _tail(self): while not self.stop_event.is_set(): data = self.infile.read() - self.buffer.write(data) + if data: + self.buffer.write(data) self.buffer.flush() # Do we really need this? TODO should be configurable time.sleep(0.01)