fix run error: xml.etree.ElementTree.Element' object has no attribute getchildren 96/308496/1
authorzhouhao02 <haozhou.zhou@samsung.com>
Tue, 26 Mar 2024 10:53:50 +0000 (18:53 +0800)
committerzhouhao02 <haozhou.zhou@samsung.com>
Tue, 26 Mar 2024 10:53:50 +0000 (18:53 +0800)
Change-Id: Ie80616bffd91429d843f8bea63996967c6d6f2f5
Signed-off-by: zhouhao02 <haozhou.zhou@samsung.com>
gitbuildsys/utils.py

index 4201425ecb13cc7513823c484388c1772ae90263..c24dbbcef0330fd848a2bb5aef1478ad9ca97cc9 100644 (file)
@@ -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']