chore(lint): cleanup repeated cause exception in logging.exception replaced by helpful message (#10425)

This commit is contained in:
Bowen Liang
2024-11-15 15:41:40 +08:00
committed by GitHub
parent db1d2aaff5
commit 51db59622c
47 changed files with 83 additions and 72 deletions

View File

@@ -38,7 +38,7 @@ def send_mail(parmas: SendEmailToolParameters):
server.sendmail(parmas.email_account, parmas.sender_to, msg.as_string())
return True
except Exception as e:
logging.exception("send email failed: %s", e)
logging.exception("send email failed")
return False
else: # NONE or TLS
try:
@@ -49,5 +49,5 @@ def send_mail(parmas: SendEmailToolParameters):
server.sendmail(parmas.email_account, parmas.sender_to, msg.as_string())
return True
except Exception as e:
logging.exception("send email failed: %s", e)
logging.exception("send email failed")
return False