Check that field separator exists

main
Bob Mottram 2020-11-06 11:24:25 +00:00
parent 933a11ca72
commit c734fc175d
1 changed files with 2 additions and 0 deletions

View File

@ -1238,6 +1238,8 @@ def createBlogPost(baseDir: str,
with open(citationsFilename, "r") as f:
citations = f.readlines()
for line in citations:
if citationsSeparator not in line:
continue
sections = line.strip().split(citationsSeparator)
if len(sections) != 3:
continue