1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 17:57:01 +08:00

Fix invalid warning when do first adb connect

This commit is contained in:
vlziw9y8
2021-10-23 14:09:13 +08:00
committed by GitHub
parent c844939632
commit 55b9cc59e7

View File

@@ -86,11 +86,10 @@ class Connection:
for _ in range(3): for _ in range(3):
msg = self.adb_command(['connect', serial]).decode("utf-8").strip() msg = self.adb_command(['connect', serial]).decode("utf-8").strip()
logger.info(msg) logger.info(msg)
if 'already' in msg: if 'connected' in msg:
return True return True
else: logger.warning(f'Failed to connect {serial} after 3 trial.')
logger.warning(f'Failed to connect {serial} after 3 trial.') return False
return False
def connect(self, serial): def connect(self, serial):
"""Connect to a device. """Connect to a device.