fix: KingClient 添加日志

This commit is contained in:
caoqianming 2024-06-19 17:45:11 +08:00
parent 97f8a1e143
commit c42dafcb44
1 changed files with 1 additions and 0 deletions

View File

@ -75,6 +75,7 @@ class KingClient(HandleLogMixin):
if 'code' in ret:
if ret['code'] != 0:
if need_auth and ret['code'] in [-1, -2]: # 认证失败
myLogger.error(f"亚控认证失败: {url}-{ret}")
self._get_token()
return self.request(url, method, params, json, timeout, raise_exception, need_auth)