From 2ab673eea36d8df1947c17332686562f422fd14e Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Thu, 24 Nov 2016 14:38:31 +0800 Subject: Fix exception caused by missing log folder Change-Id: I3a73cc0366e2c1a9c5965367ea68138f36ff1d63 Signed-off-by: Yujun Zhang --- qtip/utils/logger_utils.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qtip/utils') diff --git a/qtip/utils/logger_utils.py b/qtip/utils/logger_utils.py index e8817c3c..d5e76a64 100644 --- a/qtip/utils/logger_utils.py +++ b/qtip/utils/logger_utils.py @@ -62,4 +62,7 @@ class QtipLogger(Logger): file_path = '{}/qtip/logs'.format(os.environ['HOME']) def __init__(self, logger_name): + if not os.path.exists(self.file_path): + os.makedirs(self.file_path) + super(QtipLogger, self).__init__(logger_name) -- cgit 1.2.3-korg