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:
parent
69150040c2
commit
41661d741a
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user