更改配置文件的存取方式

This commit is contained in:
2024-04-16 17:38:57 +08:00
parent 30d99c1f08
commit b8904c32e3
7 changed files with 42 additions and 39 deletions

9
app_conf.py Normal file
View File

@@ -0,0 +1,9 @@
import configparser , os
def conf():
conf = configparser.ConfigParser()
if os.path.exists('./conf/app.ini'):
conf.read('./conf/app.ini')
else:
conf.read('./conf/app_d.ini')
return conf