Add TODO to follow up and simplify logic in tools/loader related to elementtree.

This commit is contained in:
Dannon Baker
2015-01-29 16:15:48 -05:00
parent dba89dff83
commit 5bb335f1cb
+1
View File
@@ -120,6 +120,7 @@ def _expand_macro(element, expand_el, macros):
# HACK for elementtree, newer implementations (etree/lxml) won't
# require this parent_map data structure but elementtree does not
# track parents or recongnize .find('..').
# TODO fix this now that we're not using elementtree
parent_map = dict((c, p) for p in element.getiterator() for c in p)
_xml_replace(expand_el, macro_def, parent_map)