mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 13:59:02 +08:00
Fix: Convert null to empty string
DeployConfig.to_bool() can't convert None
dbc44aa296
This commit is contained in:
parent
dbc44aa296
commit
8ab9b14b17
@ -50,7 +50,7 @@ def poor_yaml_read(file):
|
||||
k, v = result.group(1), result.group(2).strip('\n\r\t\' ')
|
||||
if v:
|
||||
if v == 'null':
|
||||
v = None
|
||||
v = ''
|
||||
data[k] = v
|
||||
|
||||
return data
|
||||
@ -67,7 +67,7 @@ def poor_yaml_write(data, file, template_file=DEPLOY_TEMPLATE):
|
||||
text = f.read().replace('\\', '/')
|
||||
|
||||
for key, value in data.items():
|
||||
if value is None:
|
||||
if value is '':
|
||||
value = 'null'
|
||||
text = re.sub(f'{key}:.*?\n', f'{key}: {value}\n', text)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user