Only write out non-empty value

This commit is contained in:
WQY\qiong
2023-03-08 23:16:07 +08:00
parent 6babe1e84c
commit 1e51a52e1a
2 changed files with 2 additions and 2 deletions

View File

@@ -46,6 +46,6 @@ def inp_out_option(name: str) -> list[str]:
for obj in objs:
key = obj['key']
value = obj['value']
if value != '':
if str(value).strip() != '':
lines.append(f'{key} {value}')
return lines

View File

@@ -64,6 +64,6 @@ def inp_out_option_v3(name: str) -> list[str]:
for obj in objs:
key = obj['key']
value = obj['value']
if value != '':
if str(value).strip() != '':
lines.append(f'{key} {value}')
return lines