Stop a crash when the logs folder already exists

This commit is contained in:
Timmy Welch 2022-04-05 00:58:19 -07:00
parent 558072a330
commit 4fb9461491

View File

@ -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(