equal
deleted
inserted
replaced
56 |
56 |
57 def get_insertion_point(section, index): |
57 def get_insertion_point(section, index): |
58 if section.attrib.get('insertafter'): |
58 if section.attrib.get('insertafter'): |
59 snode = index[section.attrib['insertafter']] |
59 snode = index[section.attrib['insertafter']] |
60 node = snode.parent |
60 node = snode.parent |
61 idx = node.getchildren().index(snode) + 1 |
61 idx = list(node).index(snode) + 1 |
62 elif section.attrib.get('insertbefore'): |
62 elif section.attrib.get('insertbefore'): |
63 snode = index[section.attrib['insertbefore']] |
63 snode = index[section.attrib['insertbefore']] |
64 node = snode.parent |
64 node = snode.parent |
65 idx = node.getchildren().index(snode) |
65 idx = node.getchildren().index(snode) |
66 elif 'appendto' in section.attrib: |
66 elif 'appendto' in section.attrib: |