This commit is contained in:
Akhil Narayanan 2026-01-06 14:37:34 +08:00 committed by GitHub
commit f08f1eca37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,7 +32,10 @@ class LogInterceptor(io.TextIOWrapper):
super().write(data)
def flush(self):
super().flush()
try:
super().flush()
except (OSError, ValueError):
pass
for cb in self._flush_callbacks:
cb(self._logs_since_flush)
self._logs_since_flush = []