Просмотр исходного кода

fix(Exploration): add timeout for shikigami addition

stigma 10 месяцев назад
Родитель
Сommit
c5415b39ce
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      tasks/Exploration/base.py

+ 4 - 0
tasks/Exploration/base.py

@@ -228,7 +228,11 @@ class BaseExploration(GameUi, GeneralBattle, GeneralRoom, GeneralInvite, Replace
                 self.swipe(self.S_SWIPE_SHIKI_TO_LEFT)
             else:
                 break
+        operation_timeout = Timer(60)
+        operation_timeout.start()
         while 1:
+            if operation_timeout.reached():
+                raise GameStuckError('Adding shikigami timeout')
             # 候补出战数量识别
             self.screenshot()
             if not self.appear(self.I_E_OPEN_SETTINGS):