1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2025-02-01 12:01:41 +01:00

prevent crash when 'stdout.line_buffering' is not defined (#642)

This commit is contained in:
Mike Fährmann 2023-10-29 15:32:11 +01:00
parent c9a2be36d4
commit e46efbd5b5
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -254,14 +254,14 @@ def stderr_write_flush(s):
sys.stderr.flush()
if sys.stdout.line_buffering:
if getattr(sys.stdout, "line_buffering", None):
def stdout_write(s):
sys.stdout.write(s)
else:
stdout_write = stdout_write_flush
if sys.stderr.line_buffering:
if getattr(sys.stderr, "line_buffering", None):
def stderr_write(s):
sys.stderr.write(s)
else: