Update Test

This commit is contained in:
Yoshiko2
2020-09-07 20:18:36 +08:00
committed by GitHub
parent 38ffc56a1a
commit 3db36d0499
5 changed files with 41 additions and 26 deletions

View File

@@ -83,9 +83,12 @@ def get_data_from_json(file_number, filepath, conf: config.Config): # 从JSON
json_data = {}
for source in sources:
json_data = json.loads(func_mapping[source](file_number))
# if any service return a valid return, break
if get_data_state(json_data):
try:
json_data = json.loads(func_mapping[source](file_number))
# if any service return a valid return, break
if get_data_state(json_data):
break
except:
break
# Return if data not found in all sources