1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-26 08:08:55 +02:00

show package status when repository configuration is broken

it was just dropped before due to lack of status element for the package
This commit is contained in:
2017-04-07 08:50:29 +02:00
parent 3397acc756
commit 0d941e8766
2 changed files with 10 additions and 0 deletions

View File

@@ -5509,6 +5509,15 @@ def result_xml_to_dicts(xml):
# always a status element
snodes = node.findall('status')
is_multi = len(snodes) > 1
if len(snodes) < 1:
# the repository setup is broken
smap = dict(rmap)
smap['pkg'] = "_repository"
smap['code'] = rmap['repostate']
smap['details'] = node.get('details')
yield smap, is_multi
continue
for statusnode in snodes:
smap = dict(rmap)
smap['pkg'] = smap['package'] = smap['pac'] = statusnode.get('package')