summaryrefslogtreecommitdiffstats
path: root/qtip
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2016-11-24 14:38:31 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2016-11-25 14:26:53 +0800
commit2ab673eea36d8df1947c17332686562f422fd14e (patch)
treea99b76e0c730f7b779b267e8b05f2e61b23182df /qtip
parent099238a0ea8f80b0765965ec306bf281c0c9dc55 (diff)
Fix exception caused by missing log folder
Change-Id: I3a73cc0366e2c1a9c5965367ea68138f36ff1d63 Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'qtip')
-rw-r--r--qtip/utils/logger_utils.py3
1 files changed, 3 insertions, 0 deletions
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)