fix(init_data): getConfig 接收应用根目录非 config 文件路径(修复 NotADirectoryError)
This commit is contained in:
parent
e5427d9516
commit
da41f6be1b
@ -89,10 +89,8 @@ SDLC_PROBLEM_TYPES = [
|
||||
|
||||
|
||||
async def init_data(demo=False):
|
||||
config_file = os.path.join(ROOT_DIR, 'conf', 'config.json')
|
||||
if not os.path.exists(config_file):
|
||||
config_file = os.path.join(ROOT_DIR, '..', 'conf', 'config.json')
|
||||
config = getConfig(config_file, NS={'workdir': ROOT_DIR, 'ProgramPath': ProgramPath()})
|
||||
# getConfig 接收应用根目录(内部拼接 conf/config.json),非 config 文件路径
|
||||
config = getConfig(ROOT_DIR, NS={'workdir': ROOT_DIR, 'ProgramPath': ProgramPath()})
|
||||
DBPools(config.databases)
|
||||
initEnv()
|
||||
env = ServerEnv()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user