mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 07:28:21 +08:00
Add: Remember the last used theme (#821)
- Add: Password in deploy config - Opt: Parse yaml value null into None
This commit is contained in:
@@ -49,6 +49,8 @@ def poor_yaml_read(file):
|
||||
if result:
|
||||
k, v = result.group(1), result.group(2).strip('\n\r\t\' ')
|
||||
if v:
|
||||
if v == 'null':
|
||||
v = None
|
||||
data[k] = v
|
||||
|
||||
return data
|
||||
@@ -65,6 +67,8 @@ def poor_yaml_write(data, file, template_file=DEPLOY_TEMPLATE):
|
||||
text = f.read().replace('\\', '/')
|
||||
|
||||
for key, value in data.items():
|
||||
if value is None:
|
||||
value = 'null'
|
||||
text = re.sub(f'{key}:.*?\n', f'{key}: {value}\n', text)
|
||||
|
||||
with open(file, 'w', encoding='utf-8') as f:
|
||||
|
||||
Reference in New Issue
Block a user