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

Fix: [CN] Increase timeout of pushing AzurLaneUncensored files

This commit is contained in:
LmeSzinc
2021-11-08 20:44:29 +08:00
parent 71392a5eba
commit 377f5be445
2 changed files with 3 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ class AzurLaneUncensored(LoginHandler):
logger.info('This will take a few seconds')
command = ['push', 'files', f'/sdcard/Android/data/{self.config.Emulator_PackageName}']
logger.info(f'Command: {command}')
self.device.adb_command(command)
self.device.adb_command(command, timeout=30)
logger.info('Push success')
# Back to root folder

View File

@@ -126,7 +126,7 @@ class Connection:
self._adb_binary = file
return file
def adb_command(self, cmd, serial=None):
def adb_command(self, cmd, serial=None, timeout=10):
if serial:
cmd = [self.adb_binary, '-s', serial] + cmd
else:
@@ -139,7 +139,7 @@ class Connection:
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=False)
else:
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
return process.communicate(timeout=10)[0]
return process.communicate(timeout=timeout)[0]
def adb_shell(self, cmd, serial=None):
cmd.insert(0, 'shell')