mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-26 20:27:13 +00:00
feat: 修改文件生成顺序
This commit is contained in:
@@ -375,12 +375,6 @@ def stop():
|
|||||||
|
|
||||||
|
|
||||||
def check_file():
|
def check_file():
|
||||||
# 配置文件存在性校验
|
|
||||||
if not os.path.exists('config.py'):
|
|
||||||
shutil.copy('config-template.py', 'config.py')
|
|
||||||
print('请先在config.py中填写配置')
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
# 检查是否有banlist.py,如果没有就把banlist-template.py复制一份
|
# 检查是否有banlist.py,如果没有就把banlist-template.py复制一份
|
||||||
if not os.path.exists('banlist.py'):
|
if not os.path.exists('banlist.py'):
|
||||||
shutil.copy('res/templates/banlist-template.py', 'banlist.py')
|
shutil.copy('res/templates/banlist-template.py', 'banlist.py')
|
||||||
@@ -411,6 +405,12 @@ def check_file():
|
|||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
|
|
||||||
|
# 配置文件存在性校验
|
||||||
|
if not os.path.exists('config.py'):
|
||||||
|
shutil.copy('config-template.py', 'config.py')
|
||||||
|
print('请先在config.py中填写配置')
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# 初始化相关文件
|
# 初始化相关文件
|
||||||
|
|||||||
Reference in New Issue
Block a user