fix run error issue for parser repomd.xml when here is group type 66/245766/1 submit/trunk/20201029.114030 submit/trunk/20201029.132130 submit/trunk/20201029.140230 submit/trunk/20201030.015026 submit/trunk/20201030.104730
authorbiao716.wang <biao716.wang@samsung.com>
Thu, 15 Oct 2020 11:11:29 +0000 (20:11 +0900)
committerbiao716.wang <biao716.wang@samsung.com>
Thu, 15 Oct 2020 11:11:29 +0000 (20:11 +0900)
Change-Id: I85eacfa800bf85f63773b0a049b38d8432475aa2
Signed-off-by: biao716.wang <biao716.wang@samsung.com>
mic/utils/misc.py

index 64bda2d4020e7eb2ddab2e52ad1b8305487b290c..399fd4e7ff0d4e87f0abd4bab6006a482004fdec 100755 (executable)
@@ -569,7 +569,8 @@ def get_metadata_from_repos(repos, cachedir):
                 break
 
         for elm in root.getiterator("%sdata" % ns):
-            if elm.attrib["type"] in ("group_gz", "group"):
+            #"group" type has no "open-checksum" filed, remove it.
+            if elm.attrib["type"] == "group_gz":
                 filepaths['comps'] = elm.find("%slocation" % ns).attrib['href']
                 checksums['comps'] = elm.find("%sopen-checksum" % ns).text
                 sumtypes['comps'] = elm.find("%sopen-checksum" % ns).attrib['type']