From ada37c10a11b68a686999def9e7b9d2df5685264 Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Fri, 23 Dec 2022 21:45:33 +0800 Subject: [PATCH] fix --- utils/Ntfy.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/utils/Ntfy.py b/utils/Ntfy.py index 9f526df..08b6f66 100644 --- a/utils/Ntfy.py +++ b/utils/Ntfy.py @@ -3,6 +3,9 @@ import requests class ntfy: @classmethod def sendMsg(cls, msg): - print(f"#ntfy: {msg}") - requests.post("https://ntfy.caiwenxiu.cn/PyComic", - data=msg.encode(encoding='utf-8')) \ No newline at end of file + try: + print(f"#ntfy: {msg}") + requests.post("https://ntfy.caiwenxiu.cn/PyComic", + data=msg.encode(encoding='utf-8')) + except: + print(f"#ntfy error: {msg}") \ No newline at end of file