From: Phillip J. Eby Date: Thu, 7 Jul 2005 15:36:20 +0000 (+0000) Subject: Fix "upload" command garbling and truncating files on Windows. If it's a X-Git-Tag: v2.5a0~1609 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5cb784629f4d05a2621db28e6c2a07e6f38095c9;p=thirdparty%2FPython%2Fcpython.git Fix "upload" command garbling and truncating files on Windows. If it's a binary file, use 'rb'! --- diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py index 7b08336c82fe..3b5a0fc9d9f3 100644 --- a/Lib/distutils/command/upload.py +++ b/Lib/distutils/command/upload.py @@ -71,7 +71,7 @@ class upload(Command): dry_run=self.dry_run) # Fill in the data - content = open(filename).read() + content = open(filename,'rb').read() data = { ':action':'file_upload', 'protcol_version':'1',