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

show error messages from the API also for type 500 errors

This commit is contained in:
Dr. Peter Poeml 2008-06-16 19:12:24 +00:00
parent dd9d1cb49f
commit 7ee4444b6b

View File

@ -81,10 +81,11 @@ def run(prg):
print >>sys.stderr, e.hdrs
print >>sys.stderr, body
if e.code in [ 400, 403, 404 ]:
msg = body.split('<summary>')[1]
msg = msg.split('</summary>')[0]
print >>sys.stderr, msg
if e.code in [ 400, 403, 404, 500 ]:
if '<summary>' in body:
msg = body.split('<summary>')[1]
msg = msg.split('</summary>')[0]
print >>sys.stderr, msg
return 1