mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-16 03:27:24 +08:00
Fix: Catch exception in the first screenshot
This commit is contained in:
2
alas.py
2
alas.py
@@ -52,6 +52,7 @@ class AzurLaneAutoScript:
|
||||
|
||||
def run(self, command):
|
||||
try:
|
||||
self.device.screenshot()
|
||||
self.__getattribute__(command)()
|
||||
return True
|
||||
except TaskEnd:
|
||||
@@ -389,7 +390,6 @@ class AzurLaneAutoScript:
|
||||
logger.info(f'Scheduler: Start task `{task}`')
|
||||
self.device.stuck_record_clear()
|
||||
self.device.click_record_clear()
|
||||
self.device.screenshot()
|
||||
logger.hr(task, level=0)
|
||||
success = self.run(inflection.underscore(task))
|
||||
logger.info(f'Scheduler: End task `{task}`')
|
||||
|
||||
Reference in New Issue
Block a user