Commit b5f5a513bf3b96187dd4632b327f18bc2aaf409d

Authored by lixi
1 parent fc917034

1

Showing 1 changed file with 4 additions and 4 deletions
commons/MySession.py
... ... @@ -173,11 +173,11 @@ class mysession(requests.Session):
173 173 #处理header
174 174 if "UAP_accessToken" in kwargs["headers"].keys():
175 175 kwargs["headers"]["UAP_accessToken"] = self.re.json()["data"]["accessToken"]
176   - elif "UAP_refreshToken" in kwargs["headers"].keys():
  176 + if "UAP_refreshToken" in kwargs["headers"].keys():
177 177 kwargs["headers"]["UAP_refreshToken"] = self.re.json()["data"]["refreshToken"]
178   - elif "UAP_firmId" in kwargs["headers"].keys():
  178 + if "UAP_firmId" in kwargs["headers"].keys():
179 179 kwargs["headers"]["UAP_firmId"] = self.re.json()["data"]["user"]["firmId"]
180   - elif "Host" in kwargs["headers"].keys():
  180 + if "Host" in kwargs["headers"].keys():
181 181 kwargs["headers"]["Host"]=host
182 182 log.info("{}\n{}\n".format(url, kwargs))
183 183 # 进行请求
... ... @@ -295,7 +295,7 @@ my.set_mark()
295 295 # 哈尔滨客户端session
296 296 # sessionHeb = mysession().cliLogin("hd_userName_01")
297 297 # 杭果客户端session
298   -sessionHg = mysession().cliLogin("hg_userName_01")
  298 +# sessionHg = mysession().cliLogin("hg_userName_01")
299 299 #获取对应市场session
300 300 # sy1=mysession("host1").get_session_client("sy_user01")
301 301 # heb=mysession("host1").get_session_client("heb_user01")
... ...