configure: don't serialize empty array elements
Before this change: $ ./configure --codegen-backends= [..] $ grep -P '^codegen-backends' config.toml codegen-backends = [''] After this change: $ ./configure --codegen-backends= [..] $ grep -P '^codegen-backends' config.toml codegen-backends = []
This commit is contained in:
parent
ba14a836c7
commit
7c20a29af8
@ -279,6 +279,10 @@ def build():
|
||||
|
||||
|
||||
def set(key, value):
|
||||
if isinstance(value, list):
|
||||
# Remove empty values, which value.split(',') tends to generate.
|
||||
value = [v for v in value if v]
|
||||
|
||||
s = "{:20} := {}".format(key, value)
|
||||
if len(s) < 70:
|
||||
p(s)
|
||||
|
Loading…
Reference in New Issue
Block a user