update tools/read_config.py.

尝试解决jenkins 流水线任务报错提示TypeNone的问题
This commit is contained in:
zy7y 2020-08-07 14:49:58 +08:00 committed by Gitee
parent c273635fe7
commit 2b6d922293
1 changed files with 6 additions and 2 deletions

View File

@ -25,8 +25,12 @@ class ReadConfig(object):
@logger.catch
def read_response_reg(self):
get_token = self.data.get("response_reg").get("token")
get_resp = self.data.get('response_reg').get('response')
# get_token = self.data.get("response_reg").get("token")
# get_resp = self.data.get('response_reg').get('response')
# 该写法与上面写法效果类似,随意选择
get_token = self.data["response_reg"]["token"]
get_resp = self.data['response_reg']['response']
logger.info(f'从响应中提取的token表达式: {get_token}')
logger.info(f'从响应提取的需要校验的表达式: {get_resp}')
return get_token, get_resp