feat: 生成配置文件后退出程序

This commit is contained in:
Rock Chin 2022-12-09 00:18:33 +08:00
parent 696a0c57ee
commit 69a0fdc890

View File

@ -66,6 +66,7 @@ if __name__ == '__main__':
if not os.path.exists('config.py'):
shutil.copy('config-template.py', 'config.py')
print('请先在config.py中填写配置')
sys.exit(0)
if len(sys.argv) > 1 and sys.argv[1] == 'init_db':
init_db()