mirror of
https://github.com/W1NDes/M-AzurLaneAutoScript.git
synced 2026-05-14 05:07:58 +08:00
Fix: Emulator name was "None" in string
This commit is contained in:
parent
190da3a1d0
commit
6726293edf
@ -47,8 +47,18 @@ class PlatformBase(Connection, EmulatorManagerBase):
|
||||
@cached_property
|
||||
def emulator_info(self) -> EmulatorInfo:
|
||||
emulator = self.config.EmulatorInfo_Emulator
|
||||
name = str(self.config.EmulatorInfo_name).strip().replace('\n', '')
|
||||
path = str(self.config.EmulatorInfo_path).strip().replace('\n', '')
|
||||
|
||||
def parse_info(value):
|
||||
if isinstance(value, str):
|
||||
value = value.strip().replace('\n', '')
|
||||
if value in ['None', 'False', 'True']:
|
||||
value = ''
|
||||
return value
|
||||
else:
|
||||
return ''
|
||||
|
||||
name = parse_info(self.config.EmulatorInfo_name)
|
||||
path = parse_info(self.config.EmulatorInfo_path)
|
||||
|
||||
return EmulatorInfo(
|
||||
emulator=emulator,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user