mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 18:39:04 +08:00
Fix: Decode error when killing adb
This commit is contained in:
parent
7b768509ea
commit
aec03ec069
@ -188,8 +188,7 @@ class EmulatorConnect:
|
||||
print(' '.join(cmd))
|
||||
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
|
||||
stdout, stderr = process.communicate(timeout=10)
|
||||
result = stdout.decode()
|
||||
return result
|
||||
return stdout
|
||||
|
||||
@cached_property
|
||||
def emulators(self):
|
||||
@ -214,7 +213,7 @@ class EmulatorConnect:
|
||||
Returns:
|
||||
list[str]: Connected devices in adb
|
||||
"""
|
||||
result = self._execute([self.adb_binary, 'devices'])
|
||||
result = self._execute([self.adb_binary, 'devices']).decode()
|
||||
devices = []
|
||||
for line in result.replace('\r\r\n', '\n').replace('\r\n', '\n').split('\n'):
|
||||
if line.startswith('List') or '\t' not in line:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user