mirror of https://github.com/python/cpython
Fix "upload" command garbling and truncating files on Windows. If it's a
binary file, use 'rb'!
This commit is contained in:
parent
4c3259cbb9
commit
5cb784629f
|
@ -71,7 +71,7 @@ class upload(Command):
|
||||||
dry_run=self.dry_run)
|
dry_run=self.dry_run)
|
||||||
|
|
||||||
# Fill in the data
|
# Fill in the data
|
||||||
content = open(filename).read()
|
content = open(filename,'rb').read()
|
||||||
data = {
|
data = {
|
||||||
':action':'file_upload',
|
':action':'file_upload',
|
||||||
'protcol_version':'1',
|
'protcol_version':'1',
|
||||||
|
|
Loading…
Reference in New Issue