From 5cb784629f4d05a2621db28e6c2a07e6f38095c9 Mon Sep 17 00:00:00 2001 From: "Phillip J. Eby" Date: Thu, 7 Jul 2005 15:36:20 +0000 Subject: [PATCH] Fix "upload" command garbling and truncating files on Windows. If it's a binary file, use 'rb'! --- Lib/distutils/command/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py index 7b08336c82f..3b5a0fc9d9f 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',