summaryrefslogtreecommitdiffstats
path: root/gallery_dl/output.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-03-25 02:57:44 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2024-03-25 02:57:44 -0400
commit6e662211019a89caec44de8a57c675872b0b5498 (patch)
tree5d9d5a2b7efc3a24dd6074e99b253b639fe5af1d /gallery_dl/output.py
parent01166fa52707cc282467427cf0e65c1b8983c4be (diff)
New upstream version 1.26.9.upstream/1.26.9
Diffstat (limited to 'gallery_dl/output.py')
-rw-r--r--gallery_dl/output.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gallery_dl/output.py b/gallery_dl/output.py
index c0971f0..2bcc222 100644
--- a/gallery_dl/output.py
+++ b/gallery_dl/output.py
@@ -224,6 +224,9 @@ def setup_logging_handler(key, fmt=LOG_FORMAT, lvl=LOG_LEVEL, mode="w"):
try:
path = util.expand_path(path)
handler = logging.FileHandler(path, mode, encoding)
+ except FileNotFoundError:
+ os.makedirs(os.path.dirname(path))
+ handler = logging.FileHandler(path, mode, encoding)
except (OSError, ValueError) as exc:
logging.getLogger("gallery-dl").warning(
"%s: %s", key, exc)