From 4fb946149100342aa27ffd3c59a545070eabdb45 Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Tue, 5 Apr 2022 00:58:19 -0700 Subject: [PATCH] Stop a crash when the logs folder already exists --- comictaggerlib/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comictaggerlib/main.py b/comictaggerlib/main.py index a27b8e0..f9b632a 100755 --- a/comictaggerlib/main.py +++ b/comictaggerlib/main.py @@ -51,7 +51,7 @@ def rotate(handler: logging.handlers.RotatingFileHandler, filename: pathlib.Path def ctmain(): - os.makedirs(ComicTaggerSettings.get_settings_folder() / "logs") + os.makedirs(ComicTaggerSettings.get_settings_folder() / "logs", exist_ok=True) stream_handler = logging.StreamHandler() stream_handler.setLevel(logging.WARNING) file_handler = logging.handlers.RotatingFileHandler(