Not all listed 'lead' sections still exist.

This commit is contained in:
Jim Miller 2020-02-06 13:28:09 -06:00
parent f519641e6e
commit bfccd4838e

View file

@ -61,7 +61,8 @@ with open(argv[1],"w", encoding="utf8") as outfile:
kl = list(sections.keys()) kl = list(sections.keys())
kl.sort() kl.sort()
for k in leadsects: for k in leadsects:
outfile.write("".join(sections[k])) if k in sections:
outfile.write("".join(sections[k]))
for k in kl: for k in kl:
if k not in (leadsects + followsects): if k not in (leadsects + followsects):