fix run error issue for parser repomd.xml when here is group type
[tools/mic.git] / mic / utils / misc.py
index 64bda2d..399fd4e 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']