diff --git a/libeoaconvert.py b/libeoaconvert.py index b85b7bd..90b2658 100644 --- a/libeoaconvert.py +++ b/libeoaconvert.py @@ -243,6 +243,9 @@ def fix_bib_entries(div_snippet): def debug_xml_here(xml_tree, xml_filename): """Dump current state of an XML tree into a file for inspection""" + if not os.path.exists("debug"): + os.makedirs(os.path.expanduser("debug")) + xml_path = "%s/debug/debug_%s.xml" % (os.getcwd(), xml_filename) if isinstance(xml_tree, etree._ElementTree):