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:
Aleksey Kliger 2025-07-07 14:54:50 -04:00
parent 1b0bc594a7
commit e2891c0fb9

View file

@ -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