From da272910ce13a74f973f8750ab8e83fb15949186 Mon Sep 17 00:00:00 2001 From: Michael Hrivnak Date: Mon, 3 Jun 2013 16:44:53 -0400 Subject: [PATCH] 970269 - making the 'id' attribute of errata references optional, since evidence suggests that they are not present in rhel6 repos. --- plugins/pulp_rpm/plugins/importers/yum/repomd/updateinfo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/pulp_rpm/plugins/importers/yum/repomd/updateinfo.py b/plugins/pulp_rpm/plugins/importers/yum/repomd/updateinfo.py index 2db7ab2e1..d8aeba45d 100644 --- a/plugins/pulp_rpm/plugins/importers/yum/repomd/updateinfo.py +++ b/plugins/pulp_rpm/plugins/importers/yum/repomd/updateinfo.py @@ -57,7 +57,9 @@ def process_package_element(element): def _parse_reference(element): return { - 'id': element.attrib['id'], + # evidence shows that the "id" attribute is sometimes missing, such as + # in a rhel6 repo. + 'id': element.attrib.get('id'), 'href': element.attrib['href'], 'type': element.attrib['type'], 'title': element.text,