mirror of https://github.com/python/cpython
Fix for issue10367, courtesy of Daniel Tavares.
This commit is contained in:
parent
045fed050f
commit
5cf79f6637
|
@ -176,6 +176,9 @@ class upload(PyPIRCCommand):
|
||||||
result = urlopen(request)
|
result = urlopen(request)
|
||||||
status = result.getcode()
|
status = result.getcode()
|
||||||
reason = result.msg
|
reason = result.msg
|
||||||
|
if self.show_response:
|
||||||
|
msg = '\n'.join(('-' * 75, r.read(), '-' * 75))
|
||||||
|
self.announce(msg, log.INFO)
|
||||||
except socket.error, e:
|
except socket.error, e:
|
||||||
self.announce(str(e), log.ERROR)
|
self.announce(str(e), log.ERROR)
|
||||||
return
|
return
|
||||||
|
@ -189,6 +192,3 @@ class upload(PyPIRCCommand):
|
||||||
else:
|
else:
|
||||||
self.announce('Upload failed (%s): %s' % (status, reason),
|
self.announce('Upload failed (%s): %s' % (status, reason),
|
||||||
log.ERROR)
|
log.ERROR)
|
||||||
if self.show_response:
|
|
||||||
msg = '\n'.join(('-' * 75, r.read(), '-' * 75))
|
|
||||||
self.announce(msg, log.INFO)
|
|
||||||
|
|
Loading…
Reference in New Issue