From f00157da4009ec345e5768ee57cf2239926ad083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 3 Aug 2025 09:19:32 +0200 Subject: [PATCH] [output] remove 'stream.reconfigure()' fallback (#7671) --- gallery_dl/output.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/gallery_dl/output.py b/gallery_dl/output.py index e4937f4e..6d82f41f 100644 --- a/gallery_dl/output.py +++ b/gallery_dl/output.py @@ -317,18 +317,7 @@ def configure_standard_streams(): elif not options.get("errors"): options["errors"] = "replace" - try: - stream.reconfigure(**options) - except AttributeError: - # no 'reconfigure' support - oget = options.get - setattr(sys, name, stream.__class__( - stream.buffer, - encoding=oget("encoding", stream.encoding), - errors=oget("errors", "replace"), - newline=oget("newline", stream.newlines), - line_buffering=oget("line_buffering", stream.line_buffering), - )) + stream.reconfigure(**options) # --------------------------------------------------------------------