修复bug
This commit is contained in:
@@ -78,15 +78,19 @@ class DeviceInfo:
|
||||
if w == 0 or h == 0 or s == 0:
|
||||
print("未获取到设备屏幕信息")
|
||||
return
|
||||
print("获取设备信息成功")
|
||||
port = self._alloc_port()
|
||||
proc = self._start_iproxy(udid, port)
|
||||
if not proc:
|
||||
print("启动iproxy失败")
|
||||
return
|
||||
model = DeviceModel(deviceId=udid, screenPort=port,
|
||||
width=w, height=h, scale=s, type=1)
|
||||
model.ready = True
|
||||
self._models[udid] = model
|
||||
self._procs[udid] = proc
|
||||
|
||||
print("准备添加设备")
|
||||
self._manager_send(model)
|
||||
|
||||
# ---------------- 移除设备 ----------------
|
||||
@@ -150,7 +154,7 @@ class DeviceInfo:
|
||||
flags = subprocess.CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP
|
||||
|
||||
return subprocess.Popen(
|
||||
[self._iproxy_path, "-u", udid, str(port), wdaScreenPort],
|
||||
[self._iproxy_path, "-u", udid, str(port), str(wdaScreenPort)],
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL,
|
||||
creationflags=flags
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user