commit | 5cb784629f4d05a2621db28e6c2a07e6f38095c9 | [log] [tgz] |
---|---|---|
author | Phillip J. Eby <pje@telecommunity.com> | Thu Jul 07 15:36:20 2005 +0000 |
committer | Phillip J. Eby <pje@telecommunity.com> | Thu Jul 07 15:36:20 2005 +0000 |
tree | a53c4245c3be2097263cb682ba9dabb77cb00ffa | |
parent | 4c3259cbb9df3b0a2f0a5ada23d4f71481e8cf7c [diff] [blame] |
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 7b08336..3b5a0fc 100644 --- a/Lib/distutils/command/upload.py +++ b/Lib/distutils/command/upload.py
@@ -71,7 +71,7 @@ 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',