1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-26 09:56:13 +01:00

- babysitter: print out headers in case of status 5XX

This commit is contained in:
Marcus Huewe 2013-05-02 22:33:04 +02:00
parent 69150040c2
commit 41661d741a

View File

@ -122,6 +122,13 @@ def run(prg):
msg = body.split('<summary>')[1] msg = body.split('<summary>')[1]
msg = msg.split('</summary>')[0] msg = msg.split('</summary>')[0]
print(msg, file=sys.stderr) print(msg, file=sys.stderr)
if e.code >= 500 and e.code <= 599:
print('\nRequest: %s' % e.filename)
print('Headers:')
for h, v in e.hdrs.items():
if h != 'Set-Cookie':
print("%s: %s" % (h, v))
return 1 return 1
except BadStatusLine as e: except BadStatusLine as e:
print('Server returned an invalid response:', e, file=sys.stderr) print('Server returned an invalid response:', e, file=sys.stderr)