From: R David Murray Date: Sun, 28 Sep 2014 15:01:42 +0000 (-0400) Subject: #10510: Fix bug in forward port of 2.7 distutils patch. X-Git-Tag: v3.5.0a1~832 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c081262be6ceed935f56e9d21a9cefe02097223e;p=thirdparty%2FPython%2Fcpython.git #10510: Fix bug in forward port of 2.7 distutils patch. Pointed out by Arfrever. --- c081262be6ceed935f56e9d21a9cefe02097223e diff --cc Lib/distutils/command/upload.py index e3f6f69607d3,1a96e2221e17..1c4fc48a1293 --- a/Lib/distutils/command/upload.py +++ b/Lib/distutils/command/upload.py @@@ -162,18 -164,15 +162,17 @@@ class upload(PyPIRCCommand) if value and value[-1:] == b'\r': body.write(b'\n') # write an extra newline (lurve Macs) body.write(end_boundary) - body.write(b"\r\n") body = body.getvalue() - self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO) + msg = "Submitting %s to %s" % (filename, self.repository) + self.announce(msg, log.INFO) # build the Request - headers = {'Content-type': - 'multipart/form-data; boundary=%s' % boundary, - 'Content-length': str(len(body)), - 'Authorization': auth} + headers = { + 'Content-type': 'multipart/form-data; boundary=%s' % boundary, + 'Content-length': str(len(body)), + 'Authorization': auth, + } request = Request(self.repository, data=body, headers=headers)