mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-13 14:05:06 +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:
|
except urllib2.HTTPError, e:
|
||||||
print >>sys.stderr, 'Error: can\'t get \'%s\'' % url
|
print >>sys.stderr, 'Error: can\'t get \'%s\'' % url
|
||||||
print >>sys.stderr, e
|
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)
|
sys.exit(1)
|
||||||
|
|
||||||
return fd
|
return fd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user