Skip to content

Commit

Permalink
Merge pull request #11984 from todor-ivanov/bugfix_WMAgent_Deprecated…
Browse files Browse the repository at this point in the history
…GetchildrenMethod_fix-11982

Remove dependency on deprecated method xml..getchildren
  • Loading branch information
amaltaro authored May 14, 2024
2 parents 6bfa43e + 8531ea3 commit c0804f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/python/WMCore/Services/TagCollector/XMLUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ def get_children(elem, event, row, key):
row for given key. The change of notations can be applied during
parsing step by using provided notations dictionary.
"""
for child in elem.getchildren():
for child in list(elem):
child_key = child.tag
child_data = child.attrib
if not child_data:
child_dict = adjust_value(child.text)
else:
child_dict = child_data

if child.getchildren(): # we got grand-children
if list(child): # we got grand-children
if child_dict:
row[key][child_key] = child_dict
else:
Expand Down

0 comments on commit c0804f9

Please sign in to comment.