fix run error: xml.etree.ElementTree.Element' object has no attribute 'getchildren sandbox/zhouhao/hellogbs
authorzhouhao <haozhou.zhou@samsung.com>
Tue, 26 Mar 2024 08:58:54 +0000 (16:58 +0800)
committerzhouhao <haozhou.zhou@samsung.com>
Tue, 26 Mar 2024 08:58:54 +0000 (16:58 +0800)
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']