Ignore Windows stderr flush errors (#2462)

This commit is contained in:
Akhil Narayanan
2026-01-07 21:52:02 +05:30
committed by GitHub
parent 42aabcfec1
commit 1fe90867a2

View File

@ -370,10 +370,13 @@ try:
pass pass
with std_log_lock: with std_log_lock:
try:
if self.is_stdout: if self.is_stdout:
original_stdout.flush() original_stdout.flush()
else: else:
original_stderr.flush() original_stderr.flush()
except (OSError, ValueError):
pass
def close(self): def close(self):
self.flush() self.flush()