aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/output.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2023-12-11 01:12:35 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2023-12-11 01:12:35 -0500
commit8f38aa2d53efca9b8daae2aa410772945f9869e1 (patch)
tree8df7cf0ae61fdeeffacb3fa96471d438f810680f /gallery_dl/output.py
parenteb0c801f2feccf351c740d44cd1406a8fad4e4d7 (diff)
parent30dee4697019389ef29458b2e3931adc976389b2 (diff)
Update upstream source from tag 'upstream/1.26.4'
Update to upstream version '1.26.4' with Debian dir d0660410628ead2b9c2c05196e8bb01d1b9961bc
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 9508ff3..c0971f0 100644
--- a/gallery_dl/output.py
+++ b/gallery_dl/output.py
@@ -210,7 +210,7 @@ def configure_logging(loglevel):
root.setLevel(minlevel)
-def setup_logging_handler(key, fmt=LOG_FORMAT, lvl=LOG_LEVEL):
+def setup_logging_handler(key, fmt=LOG_FORMAT, lvl=LOG_LEVEL, mode="w"):
"""Setup a new logging handler"""
opts = config.interpolate(("output",), key)
if not opts:
@@ -219,7 +219,7 @@ def setup_logging_handler(key, fmt=LOG_FORMAT, lvl=LOG_LEVEL):
opts = {"path": opts}
path = opts.get("path")
- mode = opts.get("mode", "w")
+ mode = opts.get("mode", mode)
encoding = opts.get("encoding", "utf-8")
try:
path = util.expand_path(path)