From 4dff160b8290af6e5aa485596a28d5547b937827 Mon Sep 17 00:00:00 2001 From: DLmaster361 Date: Wed, 17 Sep 2025 00:13:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(task):=20=E4=BF=AE=E5=A4=8D=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E5=9C=A8=E9=9B=B6=E7=94=A8=E6=88=B7=E6=83=85=E5=86=B5?= =?UTF-8?q?=E4=B8=8Bindex=E7=BC=BA=E5=A4=B1=E5=BC=95=E5=8F=91=E7=9A=84?= =?UTF-8?q?=E6=95=85=E9=9A=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/task/MAA.py | 12 ++++++++++-- app/task/general.py | 6 +++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/task/MAA.py b/app/task/MAA.py index 95d625e..3e03d35 100644 --- a/app/task/MAA.py +++ b/app/task/MAA.py @@ -971,7 +971,11 @@ class MaaManager: if self.script_id in Config.if_ignore_silence: Config.if_ignore_silence.remove(self.script_id) - if self.mode == "自动代理" and self.user_list[self.index]["status"] == "运行": + if ( + self.mode == "自动代理" + and hasattr(self, "index") + and self.user_list[self.index]["status"] == "运行" + ): if not self.maa_update_package: @@ -999,7 +1003,11 @@ class MaaManager: await self.result_record() - elif self.mode == "人工排查" and self.user_list[self.index]["status"] == "运行": + elif ( + self.mode == "人工排查" + and hasattr(self, "index") + and self.user_list[self.index]["status"] == "运行" + ): await self.result_record() diff --git a/app/task/general.py b/app/task/general.py index ffdeee2..5c656ea 100644 --- a/app/task/general.py +++ b/app/task/general.py @@ -604,7 +604,11 @@ class GeneralManager: if self.check_result != "Success!": return self.check_result - if self.mode == "自动代理" and self.user_list[self.index]["status"] == "运行": + if ( + self.mode == "自动代理" + and hasattr(self, "index") + and self.user_list[self.index]["status"] == "运行" + ): self.general_result = "用户手动中止任务"