Remove unnecessary check

This commit is contained in:
Unrud
2023-03-22 10:23:56 +01:00
committed by Unrud
parent 390240c35a
commit 77626e5aed

View File

@@ -167,8 +167,7 @@ class ThreadedStreamHandler(logging.Handler):
return
msg = self.format(record)
stream.write(msg + self.terminator)
if hasattr(stream, "flush"):
stream.flush()
stream.flush()
except Exception:
self.handleError(record)