From 9c529455265238e209d791885ff37a478caaa9d6 Mon Sep 17 00:00:00 2001 From: zhouhao02 Date: Tue, 26 Mar 2024 18:53:50 +0800 Subject: [PATCH] fix run error: xml.etree.ElementTree.Element' object has no attribute getchildren Change-Id: Ie80616bffd91429d843f8bea63996967c6d6f2f5 Signed-off-by: zhouhao02 --- gitbuildsys/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitbuildsys/utils.py b/gitbuildsys/utils.py index 4201425..c24dbbc 100644 --- a/gitbuildsys/utils.py +++ b/gitbuildsys/utils.py @@ -624,7 +624,7 @@ class GerritNameMapper(object): lst_node = root.iter("package") for node in lst_node: if "name" in node.attrib: - for child in node.getchildren(): + for child in list(node): if child.tag == 'source': self._pkg2src[node.attrib['name']] = child.text self._src2pkg[child.text] = node.attrib['name'] -- 2.34.1