Update Test
This commit is contained in:
9
core.py
9
core.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user