From bfaceada9e378ca02c0ee96a3e36c6e87f51a0df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=8C=E6=96=AF=E4=BA=9A=E6=89=98=E8=8E=89?= <122478771+HisAtri@users.noreply.github.com> Date: Wed, 12 Jul 2023 16:49:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E9=AB=98=E6=95=88=E6=98=8E?= =?UTF-8?q?=E4=BA=86=E7=9A=84=E5=AD=97=E5=85=B8=E6=8E=A8=E5=AF=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Python/asst/emulator.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Python/asst/emulator.py b/src/Python/asst/emulator.py index 1416406934..73eba10abf 100644 --- a/src/Python/asst/emulator.py +++ b/src/Python/asst/emulator.py @@ -11,7 +11,10 @@ class Bluestacks: :return: adb端口 """ with open(conf_path, encoding="UTF-8") as f: - configs = dict(list(map(lambda line: line.replace('\n', '').split('='), f.readlines()))) + configs = { + line.split('=')[0].strip(): line.split('=')[1].strip().strip('"\n') + for line in f + } if read_imageinfo_from_config: instances = [i.strip('"') for i in configs['bst.installed_images'].split(',')] instance_name = instances[0] @@ -33,4 +36,4 @@ class Bluestacks: emulator_proc = subprocess.Popen(args) time.sleep(post_delay) return emulator_proc - \ No newline at end of file +