mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-26 03:44:58 +08:00
fix: 首次启动时无法创建配置文件
This commit is contained in:
9
main.py
9
main.py
@@ -12,10 +12,6 @@ import asyncio
|
|||||||
|
|
||||||
sys.path.append(".")
|
sys.path.append(".")
|
||||||
|
|
||||||
from pkg.utils.log import init_runtime_log_file, reset_logging
|
|
||||||
from pkg.config import manager as config_mgr
|
|
||||||
from pkg.config.impls import pymodule as pymodule_cfg
|
|
||||||
|
|
||||||
|
|
||||||
def check_file():
|
def check_file():
|
||||||
# 检查是否有banlist.py,如果没有就把banlist-template.py复制一份
|
# 检查是否有banlist.py,如果没有就把banlist-template.py复制一份
|
||||||
@@ -58,6 +54,11 @@ def check_file():
|
|||||||
# 初始化相关文件
|
# 初始化相关文件
|
||||||
check_file()
|
check_file()
|
||||||
|
|
||||||
|
from pkg.utils.log import init_runtime_log_file, reset_logging
|
||||||
|
from pkg.config import manager as config_mgr
|
||||||
|
from pkg.config.impls import pymodule as pymodule_cfg
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import colorlog
|
import colorlog
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
Reference in New Issue
Block a user