mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
使用高效明了的字典推导式
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user