From 5b2f11f0e14553bf69be302c00d30ebed80d1996 Mon Sep 17 00:00:00 2001 From: Cp0204 Date: Wed, 4 Dec 2024 10:37:04 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E4=BC=98=E5=8C=96=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使用深拷贝避免修改原始配置数据 - 默认启用控制台通知配置 --- telecom_monitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telecom_monitor.py b/telecom_monitor.py index 078cedf..228e459 100644 --- a/telecom_monitor.py +++ b/telecom_monitor.py @@ -38,8 +38,8 @@ def send_notify(title, body): # 如未配置 push_config 则使用青龙环境通知设置 if CONFIG_DATA.get("push_config"): - CONFIG_DATA["push_config"]["CONSOLE"] = True - notify.push_config = CONFIG_DATA["push_config"] + notify.push_config = CONFIG_DATA["push_config"].copy() + notify.push_config["CONSOLE"] = notify.push_config.get("CONSOLE", True) notify.send(title, body) except Exception as e: if e: