Commit c181a470 authored by ibuler's avatar ibuler

[Bugfix] 修复logs目录无法创建的问题

parent 843ff6c2
......@@ -11,6 +11,8 @@ from .conf import config as app_config
def create_logger():
level = app_config['LOG_LEVEL']
log_dir = app_config['LOG_DIR']
if not os.path.isdir(log_dir):
os.makedirs(log_dir)
log_path = os.path.join(log_dir, 'coco.log')
main_setting = {
'handlers': ['console', 'file'],
......
......@@ -19,8 +19,9 @@ import signal
dirs = ('logs', 'keys')
for d in dirs:
if not os.path.isdir(d):
os.makedirs(d)
d2 = os.path.join('data', d)
if not os.path.isdir(d2):
os.makedirs(d2)
from coco import Coco
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment