mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 07:28:21 +08:00
Merge branch 'master' into dev
# Conflicts: # module/device/emulator.py
This commit is contained in:
@@ -8,6 +8,7 @@ from adbutils.errors import AdbError
|
||||
from deploy.emulator import VirtualBoxEmulator
|
||||
from module.base.decorator import cached_property
|
||||
from module.device.connection import Connection
|
||||
from module.device.method.utils import get_serial_pair
|
||||
from module.exception import RequestHumanTakeover, EmulatorNotRunningError
|
||||
from module.logger import logger
|
||||
|
||||
@@ -162,9 +163,10 @@ class EmulatorManager(Connection):
|
||||
logger.info('Find the only emulator, using it')
|
||||
return emulator, cur_serial[0]
|
||||
except FileNotFoundError:
|
||||
logger.warning('The emulator corresponding to serial is not found, '
|
||||
'please check the setting or use custom command')
|
||||
raise RequestHumanTakeover
|
||||
pass
|
||||
logger.warning('The emulator corresponding to serial is not found, '
|
||||
'please check the setting or use custom command')
|
||||
raise RequestHumanTakeover
|
||||
|
||||
@staticmethod
|
||||
def execute(command):
|
||||
@@ -300,8 +302,13 @@ class EmulatorManager(Connection):
|
||||
self.sleep(2)
|
||||
return False
|
||||
|
||||
def emulator_restart(self):
|
||||
serial = self.serial
|
||||
logger.warning('Kill emulator failed for 3 times, please check your settings')
|
||||
raise RequestHumanTakeover
|
||||
|
||||
def emulator_restart(self, kill=True):
|
||||
serial, _ = get_serial_pair(self.serial)
|
||||
if serial is None:
|
||||
serial = self.serial
|
||||
|
||||
if not self.config.RestartEmulator_Enable:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user