From 8531ea3f453884a26c7ab27fd6dea15f71277a43 Mon Sep 17 00:00:00 2001 From: Todor Ivanov Date: Tue, 14 May 2024 17:32:20 +0200 Subject: [PATCH] Remove dependency on deprecated method xml..getchildren --- src/python/WMCore/Services/TagCollector/XMLUtils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/WMCore/Services/TagCollector/XMLUtils.py b/src/python/WMCore/Services/TagCollector/XMLUtils.py index 7705a00129..6506de57db 100644 --- a/src/python/WMCore/Services/TagCollector/XMLUtils.py +++ b/src/python/WMCore/Services/TagCollector/XMLUtils.py @@ -71,7 +71,7 @@ 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: @@ -79,7 +79,7 @@ def get_children(elem, event, row, key): 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: