Skip to content

Commit

Permalink
Merge branch 'master' into dockerize
Browse files Browse the repository at this point in the history
  • Loading branch information
EsGeh authored and EsGeh committed Nov 14, 2019
2 parents 511a25e + 931a076 commit 8bad61a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/eoatex2imxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1706,8 +1706,14 @@ def make_indices_child_of_div0():

if index_sections:
for section in index_sections:
parent_div0 = section.xpath("./ancestor::div0")[0]
parent_div0.append(section)
try:
parent_div = section.xpath("./ancestor::div0")[0]
except IndexError:
logging.warning("Index is not embedded in div0, but div1 ")
parent_div = section.xpath("./ancestor::div1")[0]
parent_div.append(section)

libeoaconvert.debug_xml_here( xmlTree, "indexmover", DEBUG_DIR)

make_indices_child_of_div0()
etree.strip_tags(xmlTree, "tagtobestripped")
Expand Down

0 comments on commit 8bad61a

Please sign in to comment.