mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-11 05:20:57 +00:00
feat: 生成配置文件后退出程序
This commit is contained in:
@@ -66,6 +66,7 @@ if __name__ == '__main__':
|
|||||||
if not os.path.exists('config.py'):
|
if not os.path.exists('config.py'):
|
||||||
shutil.copy('config-template.py', 'config.py')
|
shutil.copy('config-template.py', 'config.py')
|
||||||
print('请先在config.py中填写配置')
|
print('请先在config.py中填写配置')
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
if len(sys.argv) > 1 and sys.argv[1] == 'init_db':
|
if len(sys.argv) > 1 and sys.argv[1] == 'init_db':
|
||||||
init_db()
|
init_db()
|
||||||
|
|||||||
Reference in New Issue
Block a user