From d84e53bf83d73624ae37114e68d8f1e72f165ed8 Mon Sep 17 00:00:00 2001 From: facat Date: Sat, 22 Jun 2019 15:20:58 +0800 Subject: [PATCH] =?UTF-8?q?1.=E9=BB=98=E8=AE=A4=E4=BD=BF=E7=94=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- download_speed/config.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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):