diff --git a/download_speed/config.py b/download_speed/config.py index 1dd1e1f..5433f3b 100644 --- a/download_speed/config.py +++ b/download_speed/config.py @@ -1,7 +1,8 @@ import argparse import json import sys -print('Config is loaded.') + +print("Config is loaded.") _g_args = None _json_obj = None @@ -43,8 +44,10 @@ def init_config(): _args = parser.parse_args() _g_args = _args global _json_obj - _json_obj = read_json() - return _args + js = read_json() + if "mysql_enable" not in js: + js["mysql_enable"] = True # 默认使用数据库 + _json_obj = js def get(_setting):