AirtestProject / AirtestProject/Airtest

关于使用subprocess执行ios_minicap时获取不到Banner信息就中断了

Abierto
#648 2 comentarios 0 reacciones 1 asignado Reclamado por @Howarden34 Ver en GitHub
Lenguaje dominante
Python
Estrellas
9.6k
Forks
1.5k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

执行minicap.py setup方法的时候报错不能显示banner信息
```
#airtest/core/ios/minicap.py

def setup(self):
cmd = [self.executable, "--udid", self.udid, "--port", str(self.port), "--resolution", self.resolution]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdin=subprocess.PIPE)
nbsp = NonBlockingStreamReader(proc.stdout, print_output=True, name="minicap_sever")
while True:
line = nbsp.readline(timeout=10.0)
if line is None:
raise RuntimeError("minicap setup error")
if b"== Banner ==" in line:
break
if proc.poll() is not None:
logging.warn("Minicap server already started, use old one")
self.server_proc = proc
```
只能获取到这部分的信息:
EnableDALDevices
2019-12-19 15:22:21.821 ios_minicap[62283:3120570] Available devices:
2019-12-19 15:22:21.821 ios_minicap[62283:3120570] 214fce468bacae0998f0d857ea5452548198b1b8
2019-12-19 15:22:21.821 ios_minicap[62283:3120570] DJH434115P8F6VTDV

下面这段信息就没有输出直接报:raise RuntimeError("minicap setup error")
resolution: 320x568
Allocating 555008 bytes for JPEG encoder
== Banner ==
version: 1
size: 24
pid: 62283
real width: 320
real height: 568
desired width: 320
desired height: 568
orientation:
quirks: 1
banner: 1184bf3004010038200401003820001

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.