增加健壮度。修复wda无法启动的bug。
This commit is contained in:
@@ -36,11 +36,14 @@ if __name__ == "__main__":
|
||||
manager.start()
|
||||
|
||||
# 设备监听(即使失败/很快返回,也不会导致主进程退出)
|
||||
try:
|
||||
info = Deviceinfo()
|
||||
info.startDeviceListener()
|
||||
except Exception as e:
|
||||
print("[WARN] Device listener not running:", e)
|
||||
# try:
|
||||
# info = Deviceinfo()
|
||||
# info.startDeviceListener()
|
||||
# except Exception as e:
|
||||
# print("[WARN] Device listener not running:", e)
|
||||
|
||||
info = Deviceinfo()
|
||||
info.startDeviceListener()
|
||||
|
||||
# === 保活:阻塞主线程,直到收到 Ctrl+C/关闭 ===
|
||||
import threading, time, signal
|
||||
|
||||
Reference in New Issue
Block a user