Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Missing formatted citations are dangerous
  • Loading branch information
kthoden committed Jul 30, 2019
1 parent 1aad91b commit 26ccafa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tei2imxml.py
Expand Up @@ -332,7 +332,11 @@ def format_citations(used_citekeys, bibdata, html_file):
citation_dict[citekey] = (authoryear_citation, year_citation, title)
"""

cites = etree.parse(str(html_file))
try:
cites = etree.parse(str(html_file))
except OSError:
logging.error(f"File {str(html_file)} does not exist. Try and create it by running this script without the -n option. Exiting")
sys.exit(1)

citation_dict = {}

Expand Down

0 comments on commit 26ccafa

Please sign in to comment.