mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-28 07:26:15 +01:00
fix KeyError exception when a status is missing in the result
This commit is contained in:
parent
f041ee43ba
commit
25ab4d7af6
15
osc/core.py
15
osc/core.py
@ -2516,13 +2516,14 @@ def get_prj_results(apiurl, prj, show_legend=False, csv=False):
|
|||||||
if not status.has_key(pac) or not status[pac].has_key(tg):
|
if not status.has_key(pac) or not status[pac].has_key(tg):
|
||||||
# for newly added packages, status may be missing
|
# for newly added packages, status may be missing
|
||||||
st = '?'
|
st = '?'
|
||||||
try:
|
else:
|
||||||
st = buildstatus_symbols[status[pac][tg]]
|
try:
|
||||||
except:
|
st = buildstatus_symbols[status[pac][tg]]
|
||||||
print 'osc: warn: unknown status \'%s\'...' % status[pac][tg]
|
except:
|
||||||
print 'please edit osc/core.py, and extend the buildstatus_symbols dictionary.'
|
print 'osc: warn: unknown status \'%s\'...' % status[pac][tg]
|
||||||
st = '?'
|
print 'please edit osc/core.py, and extend the buildstatus_symbols dictionary.'
|
||||||
buildstatus_symbols[status[pac][tg]] = '?'
|
st = '?'
|
||||||
|
buildstatus_symbols[status[pac][tg]] = '?'
|
||||||
line.append(st)
|
line.append(st)
|
||||||
line.append(' ')
|
line.append(' ')
|
||||||
line.append(' %s %s' % tg)
|
line.append(' %s %s' % tg)
|
||||||
|
Loading…
Reference in New Issue
Block a user