From f4ab34c298198e8ae9ad606e7f2f2abed6e70634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Sun, 7 Jun 2020 23:43:52 +0200 Subject: [PATCH] =?UTF-8?q?erstellt=20verzeichnisse=20f=C3=BCrs=20log,=20f?= =?UTF-8?q?alls=20diese=20nicht=20existieren?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- geruecht/logger.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/geruecht/logger.py b/geruecht/logger.py index f63ef04..c428a18 100644 --- a/geruecht/logger.py +++ b/geruecht/logger.py @@ -1,13 +1,15 @@ import logging import logging.config import yaml -from os import path +from os import path, makedirs, getcwd if not path.exists("geruecht/log/debug"): a = path.join(path.curdir, "geruecht", "log", "debug") + makedirs(a) if not path.exists("geruecht/log/info"): b = path.join(path.curdir, "geruecht", "log", "info") + makedirs(b) with open("geruecht/logging.yml", 'rt') as file: