From 3357500277b99aef5013b952629b2e97e6e3a351 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Thu, 18 Jul 2024 21:59:24 +0800 Subject: [PATCH] Fix: Auto-fill emulator info on Windows only (cherry picked from commit ccd19417ec3965fb2fa5a8040a00d88e4070ec9c) --- module/device/device.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/device/device.py b/module/device/device.py index 6a0485c0c..673037769 100644 --- a/module/device/device.py +++ b/module/device/device.py @@ -3,6 +3,7 @@ import itertools from lxml import etree +from module.device.env import IS_WINDOWS # Patch pkg_resources before importing adbutils and uiautomator2 from module.device.pkg_resources import get_distribution @@ -86,7 +87,7 @@ class Device(Screenshot, Control, AppControl): raise # Auto-fill emulator info - if self.config.EmulatorInfo_Emulator == 'auto': + if IS_WINDOWS and self.config.EmulatorInfo_Emulator == 'auto': _ = self.emulator_instance # SRC only, use nemu_ipc if available