configure.py: Write last key in each section
The loop that writes the keys in each section of bootstrap.toml accumulates all the commented lines before a given key and emits them when it reaches the next key in the section. This ends up dropping lines accumulated for the last key
This commit is contained in:
parent
1b0bc594a7
commit
e2891c0fb9
1 changed files with 4 additions and 0 deletions
|
|
@ -752,6 +752,10 @@ def write_uncommented(target, f):
|
|||
is_comment = True
|
||||
continue
|
||||
is_comment = is_comment and line.startswith("#")
|
||||
# Write the last accumulated block
|
||||
if len(block) > 0 and not is_comment:
|
||||
for ln in block:
|
||||
f.write(ln + "\n")
|
||||
return f
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue