From d200fa3d91dcab5da30aab3023947170a30cdf05 Mon Sep 17 00:00:00 2001 From: Shawnsdaddy Date: Fri, 15 Sep 2023 10:45:55 -0700 Subject: [PATCH] =?UTF-8?q?bug=20fix=20=E8=AF=BB=E5=8F=96=E7=A9=BA?= =?UTF-8?q?=E6=88=BF=E9=97=B4=E6=97=B6=E9=80=80=E5=87=BA=E5=9F=BA=E5=BB=BA?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arknights_mower/solvers/base_schedule.py | 27 ++++++++++++------------ 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/arknights_mower/solvers/base_schedule.py b/arknights_mower/solvers/base_schedule.py index a947ac80b..231518c6d 100644 --- a/arknights_mower/solvers/base_schedule.py +++ b/arknights_mower/solvers/base_schedule.py @@ -468,22 +468,21 @@ def infra_main(self): def agent_get_mood(self, skip_dorm=False, force=False): # 暂时规定纠错只适用于主班表 - need_read = set(v.room for k, v in self.op_data.operators.items() if v.need_to_refresh()) + need_read = set(v.room for k, v in self.op_data.operators.items() if v.need_to_refresh() and v.room in base_room_list) for room in need_read: error_count = 0 - if room in base_room_list: - while True: - try: - self.enter_room(room) - _mood_data = self.get_agent_from_room(room) - logger.info(f'房间 {room} 心情为:{_mood_data}') - break - except Exception as e: - if error_count > 3: raise e - logger.exception(e) - error_count += 1 - self.back() - continue + while True: + try: + self.enter_room(room) + _mood_data = self.get_agent_from_room(room) + logger.info(f'房间 {room} 心情为:{_mood_data}') + break + except Exception as e: + if error_count > 3: raise e + logger.exception(e) + error_count += 1 + self.back() + continue self.back() plan = self.op_data.plan fix_plan = {}