diff options
| author | 2024-03-25 02:57:50 -0400 | |
|---|---|---|
| committer | 2024-03-25 02:57:50 -0400 | |
| commit | 039aecad63a074bdcc75bd4f30c84bdc4a1a244f (patch) | |
| tree | 39997d0361f67208c716fba6717895b42ee309d1 /gallery_dl/output.py | |
| parent | 77d11300e15ee4045b187a58ee6e039624e5d69c (diff) | |
| parent | 6e662211019a89caec44de8a57c675872b0b5498 (diff) | |
Update upstream source from tag 'upstream/1.26.9'
Update to upstream version '1.26.9'
with Debian dir e04ff15132747292d335c9d456bd879aca333115
Diffstat (limited to 'gallery_dl/output.py')
| -rw-r--r-- | gallery_dl/output.py | 3 |
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) |
