Skip to content

Commit 02711c3

Browse files
committed
feat: adjust log
1 parent 71b7d91 commit 02711c3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

auth_swust/auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def try_login(self) -> Union[Tuple[bool, str], Tuple[bool, Any]]:
5959
logger.error("❌ 请求超时: {}".format(e))
6060
return self.check_success()
6161
except RequestException as e:
62-
logger.error("❌ 请求错误,可能是教务处的网站错误或者是本地网络的问题。: {}".format(e))
62+
logger.error("❌ 网络错误,可能是教务处的网站错误或者是本地网络的问题。: {}".format(e))
6363
return False, "RequestException"
6464
except Exception as e:
6565
logger.error("❌ 捕获到异常: {}".format(e))
@@ -201,4 +201,4 @@ def add_common_website_cookies(self):
201201
self.sess.get(URL.syk_base_url + verify_href)
202202
self.sess.get(URL.syk_base_url + "/StuExpbook/login.jsp")
203203
else:
204-
logger.error("登录实验课表失败:{}".format(str(soup)))
204+
logger.error("登录实验课网站失败:{}".format(str(soup)))

auth_swust/helpers/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def wrapper(*args, **kwargs):
2828
auth_fail_count = 0
2929
result, info = func(*args, **kwargs)
3030
while not result and i < times:
31-
logger.debug(f"登录失败,开始重试第 {i + 1} 次")
31+
logger.info(f"登录失败,重试第 {i + 1} 次")
3232
time.sleep(second)
3333

3434
if result is False and info == "AuthFail":

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ ignore =
2727
F403,
2828
per-file-ignores =
2929
# F401: imported but unused
30-
auth_swust/log.py:F401
30+
auth_swust/log.py:F401

0 commit comments

Comments
 (0)