mirror of
https://github.com/W1NDes/M-AzurLaneAutoScript.git
synced 2026-05-14 07:08:04 +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
|
@cached_property
|
||||||
def emulator_info(self) -> EmulatorInfo:
|
def emulator_info(self) -> EmulatorInfo:
|
||||||
emulator = self.config.EmulatorInfo_Emulator
|
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(
|
return EmulatorInfo(
|
||||||
emulator=emulator,
|
emulator=emulator,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user