mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-04 02:26:16 +01:00
urlopen(): for server return code 500, print out the reply body
This commit is contained in:
parent
755a4e7626
commit
79092b2a86
@ -583,6 +583,8 @@ def urlopen(url, data=None):
|
||||
except urllib2.HTTPError, e:
|
||||
print >>sys.stderr, 'Error: can\'t get \'%s\'' % url
|
||||
print >>sys.stderr, e
|
||||
if e.code == 500:
|
||||
print >>sys.stderr, '\nDebugging output follows.\nurl:\n%s\nresponse:\n%s' % (url, e.read())
|
||||
sys.exit(1)
|
||||
|
||||
return fd
|
||||
|
Loading…
Reference in New Issue
Block a user