fix: kingclient 优化
This commit is contained in:
parent
2b1d22df85
commit
64af59d22d
|
@ -79,7 +79,7 @@ class KingClient(HandleLogMixin):
|
|||
ret = r.json()
|
||||
if 'code' in ret:
|
||||
if ret['code'] != 0:
|
||||
if need_auth and ret['code'] in [-1, -2] and url != '/api/v1/variables': # 认证失败
|
||||
if need_auth and ret['code'] in [-1, -2]: # and url != '/api/v1/variables': # 认证失败
|
||||
# 如果这里没有判断准确,可能会导致多次触发login
|
||||
myLogger.error(f"亚控认证失败: {self.headers}-{url}-{ret}")
|
||||
is_ok, _ = self._get_token()
|
||||
|
|
Loading…
Reference in New Issue