Fix for issue10367, courtesy of Daniel Tavares.

This commit is contained in:
Phillip J. Eby 2010-12-03 17:00:40 +00:00
parent 045fed050f
commit 5cf79f6637
1 changed files with 3 additions and 3 deletions

View File

@ -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)