From f08dc975769c851d936a9e8a094c98a1340892b4 Mon Sep 17 00:00:00 2001 From: Richard Poettler Date: Wed, 8 Jul 2015 10:47:14 +0200 Subject: [PATCH] logging crashes if the directory doesn't exist --- config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/config.py b/config.py index f93c36c70..4d019590e 100644 --- a/config.py +++ b/config.py @@ -63,6 +63,7 @@ def defPaths(): format = '%(asctime)s %(name)-24s %(levelname)-8s %(message)s' logging.basicConfig(format=format, level=logLevel) + __createSavePath() handler = logging.handlers.RotatingFileHandler(os.path.join(savePath, "log.txt"), maxBytes=1000000, backupCount=3) formatter = logging.Formatter(format) handler.setFormatter(formatter)