From a9db24d80fda852fca2953dd4fb97d3f47c3ea89 Mon Sep 17 00:00:00 2001 From: minecraft1024a Date: Sun, 17 Aug 2025 19:40:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(maizone):=20=E4=BF=AE=E5=A4=8D=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=8A=A8=E6=80=81=E6=97=B6=E5=9B=A0feed=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E5=BC=95=E5=8F=91=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在处理QQ空间动态列表时,单个`feed`对象可能为`None`,导致在访问其属性(如`appid`)时引发`TypeError`。 本次提交通过增加一个空值检查,在遍历动态列表时跳过为`None`的`feed`项,从而避免了潜在的程序崩溃,增强了代码的健壮性。 --- .../built_in/maizone_refactored/services/qzone_service.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/built_in/maizone_refactored/services/qzone_service.py b/src/plugins/built_in/maizone_refactored/services/qzone_service.py index b958478cd..9495bd414 100644 --- a/src/plugins/built_in/maizone_refactored/services/qzone_service.py +++ b/src/plugins/built_in/maizone_refactored/services/qzone_service.py @@ -460,6 +460,8 @@ class QZoneService: feeds_list = [] for feed in feeds_data: + if feed is None: + continue if str(feed.get("appid", "")) != "311" or str(feed.get("uin", "")) == str(uin): continue