1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-27 07:06:13 +01:00

- display reason for build status is 'broken'

- handle 'project not found' error in show_project_meta()
This commit is contained in:
Dr. Peter Poeml 2006-06-01 09:05:47 +00:00
parent 5d4571c5b5
commit f513dc91e3

View File

@ -649,7 +649,17 @@ def check_store_version(dir):
def meta_get_packagelist(prj): def meta_get_packagelist(prj):
u = makeurl(['source', prj, '_meta']) u = makeurl(['source', prj, '_meta'])
f = urllib2.urlopen(u)
try:
f = urllib2.urlopen(u)
except urllib2.HTTPError, e:
if e.code == 404:
print 'project \'%s\' does not exist' % prj
sys.exit(1)
else:
print e
print 'url: \'%s\'' % u
sys.exit(1)
tree = ET.parse(f) tree = ET.parse(f)
root = tree.getroot() root = tree.getroot()
@ -977,7 +987,7 @@ def get_results(prj, package, platform):
statusnode = node.find('status') statusnode = node.find('status')
rmap['status'] = statusnode.get('code') rmap['status'] = statusnode.get('code')
if rmap['status'] == 'expansion error': if rmap['status'] in ['expansion error', 'broken']:
rmap['status'] += ': ' + statusnode.find('summary').text rmap['status'] += ': ' + statusnode.find('summary').text
if rmap['status'] == 'failed': if rmap['status'] == 'failed':