mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-06 13:18:42 +02:00
urlopen(): for server return code 500, print out the reply body
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user