diff --git a/lib/galaxy/tools/parser/xml.py b/lib/galaxy/tools/parser/xml.py index c142c97745d..380b47308be 100644 --- a/lib/galaxy/tools/parser/xml.py +++ b/lib/galaxy/tools/parser/xml.py @@ -329,7 +329,7 @@ class XmlToolSource(ToolSource): output_collection.outputs[output_name] = data output_collections[name] = output_collection - for out_child in out_elem.getchildren(): + for out_child in out_elem: if out_child.tag == "data": _parse(out_child) elif out_child.tag == "collection": diff --git a/scripts/extract_toolbox_sections.py b/scripts/extract_toolbox_sections.py index cc0a49bd28d..20e3e5a2675 100644 --- a/scripts/extract_toolbox_sections.py +++ b/scripts/extract_toolbox_sections.py @@ -14,18 +14,18 @@ def main(): # index range 1-1000, current sections/tools divided between 250-750 sectionindex = 250 - sectionfactor = int(500 / len(root.getchildren())) + sectionfactor = int(500 / len(root)) - for rootchild in root.getchildren(): + for rootchild in root: currentsectionlabel = "" if (rootchild.tag == "section"): sectionname = rootchild.attrib['name'] # per section tool index range 1-1000, current labels/tools # divided between 20 and 750 toolindex = 250 - toolfactor = int(500 / len(rootchild.getchildren())) + toolfactor = int(500 / len(rootchild)) currentlabel = "" - for sectionchild in rootchild.getchildren(): + for sectionchild in rootchild: if (sectionchild.tag == "tool"): addToToolDict(sectionchild, sectionname, sectionindex, toolindex, currentlabel) toolindex += toolfactor