1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

handle missing details gracefully

This commit is contained in:
Ludwig Nussel 2010-03-01 13:44:37 +01:00
parent 9f6901b4ff
commit 8cea18e26c

View File

@ -3494,7 +3494,9 @@ def get_results(apiurl, prj, package, lastbuild=None, repository=[], arch=[]):
rmap['status'] = ''
if rmap['status'] in ['expansion error', 'broken', 'blocked', 'finished']:
rmap['status'] += ': ' + statusnode.find('details').text
details = statusnode.find('details')
if details != None:
rmap['status'] += ': ' + details.text
if rmap['dirty'] == 'true':
rmap['status'] = 'state is outdated (was: %s)' % rmap['status']