From f7ce33c85c550307dd505b68240e9f64498aee65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Mon, 13 Mar 2023 12:04:24 +0100 Subject: [PATCH] [output] set 'errors=replace' for output streams (#3765) fixes regression from e480a933 --- gallery_dl/output.py | 11 +++++------ gallery_dl/version.py | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/gallery_dl/output.py b/gallery_dl/output.py index 1d53851d..4f2ee269 100644 --- a/gallery_dl/output.py +++ b/gallery_dl/output.py @@ -270,16 +270,15 @@ else: def configure_standard_streams(): for name in ("stdout", "stderr", "stdin"): - options = config.get(("output",), name) - if not options: - continue - stream = getattr(sys, name, None) if not stream: continue - if isinstance(options, str): - options = {"encoding": options, "errors": "replace"} + options = config.get(("output",), name) + if not options: + options = {"errors": "replace"} + elif isinstance(options, str): + options = {"errors": "replace", "encoding": options} elif not options.get("errors"): options["errors"] = "replace" diff --git a/gallery_dl/version.py b/gallery_dl/version.py index 494b7f5f..5d4b3709 100644 --- a/gallery_dl/version.py +++ b/gallery_dl/version.py @@ -6,4 +6,4 @@ # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. -__version__ = "1.25.0" +__version__ = "1.25.1-dev"