Kaydet (Commit) 5cf79f66 authored tarafından Phillip J. Eby's avatar Phillip J. Eby

Fix for issue10367, courtesy of Daniel Tavares.

üst 045fed05
...@@ -176,6 +176,9 @@ class upload(PyPIRCCommand): ...@@ -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): ...@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment