summaryrefslogtreecommitdiffstats
path: root/gallery_dl/output.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/output.py')
-rw-r--r--gallery_dl/output.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gallery_dl/output.py b/gallery_dl/output.py
index 4f2ee26..9508ff3 100644
--- a/gallery_dl/output.py
+++ b/gallery_dl/output.py
@@ -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: