mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 05:45:37 +08:00
Fix deprecated `getchildren()`
See https://docs.python.org/2/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.getchildren
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user