Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5cb7846

Browse files
committed
Fix "upload" command garbling and truncating files on Windows. If it's a
binary file, use 'rb'!
1 parent 4c3259c commit 5cb7846

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/distutils/command/upload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def upload_file(self, command, pyversion, filename):
7171
dry_run=self.dry_run)
7272

7373
# Fill in the data
74-
content = open(filename).read()
74+
content = open(filename,'rb').read()
7575
data = {
7676
':action':'file_upload',
7777
'protcol_version':'1',

0 commit comments

Comments
 (0)