Skip to content

Commit

Permalink
bug fix 读取空房间时退出基建页面
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawnsdaddy committed Sep 15, 2023
1 parent d5fbbdc commit d200fa3
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions arknights_mower/solvers/base_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down

0 comments on commit d200fa3

Please sign in to comment.