1.默认使用数据库。
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
print('Config is loaded.')
|
|
||||||
|
print("Config is loaded.")
|
||||||
_g_args = None
|
_g_args = None
|
||||||
_json_obj = None
|
_json_obj = None
|
||||||
|
|
||||||
@@ -43,8 +44,10 @@ def init_config():
|
|||||||
_args = parser.parse_args()
|
_args = parser.parse_args()
|
||||||
_g_args = _args
|
_g_args = _args
|
||||||
global _json_obj
|
global _json_obj
|
||||||
_json_obj = read_json()
|
js = read_json()
|
||||||
return _args
|
if "mysql_enable" not in js:
|
||||||
|
js["mysql_enable"] = True # 默认使用数据库
|
||||||
|
_json_obj = js
|
||||||
|
|
||||||
|
|
||||||
def get(_setting):
|
def get(_setting):
|
||||||
|
|||||||
Reference in New Issue
Block a user