[Python-checkins] r86978 - python/branches/release27-maint/Lib/distutils/command/upload.py

phillip.eby python-checkins at python.org
Fri Dec 3 18:00:40 CET 2010


Author: phillip.eby
Date: Fri Dec  3 18:00:40 2010
New Revision: 86978

Log:
Fix for issue10367, courtesy of Daniel Tavares.


Modified:
   python/branches/release27-maint/Lib/distutils/command/upload.py

Modified: python/branches/release27-maint/Lib/distutils/command/upload.py
==============================================================================
--- python/branches/release27-maint/Lib/distutils/command/upload.py	(original)
+++ python/branches/release27-maint/Lib/distutils/command/upload.py	Fri Dec  3 18:00:40 2010
@@ -176,6 +176,9 @@
             result = urlopen(request)
             status = result.getcode()
             reason = result.msg
+            if self.show_response:
+                msg = '\n'.join(('-' * 75, r.read(), '-' * 75))
+                self.announce(msg, log.INFO)
         except socket.error, e:
             self.announce(str(e), log.ERROR)
             return
@@ -189,6 +192,3 @@
         else:
             self.announce('Upload failed (%s): %s' % (status, reason),
                           log.ERROR)
-        if self.show_response:
-            msg = '\n'.join(('-' * 75, r.read(), '-' * 75))
-            self.announce(msg, log.INFO)


More information about the Python-checkins mailing list