Skip to content

Commit

Permalink
if a collection has no name, use a UUID on import
Browse files Browse the repository at this point in the history
Fixes #1100838, some SUSE repositories don't have that name element.
  • Loading branch information
Michael Moll authored and mmoll committed Oct 30, 2014
1 parent 2dba6e8 commit ce51281
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/pulp_rpm/plugins/importers/yum/repomd/updateinfo.py
Expand Up @@ -79,12 +79,17 @@ def _parse_reference(element):
def _parse_collection(element):
ret = {
'packages': map(_parse_package, element.findall('package')),
'name': element.find('name').text,
}
# based on yum's parsing, this could be optional. See yum.update_md.UpdateNotice._parse_pkglist
if 'short' in element.attrib:
ret['short'] = element.attrib['short']

name = element.find('name')
if name is not None:
ret['name'] = name.text
else:
ret['name'] = ""

return ret


Expand Down

0 comments on commit ce51281

Please sign in to comment.