Merge pull request #27686 from rallytime/bp-27476

Back-port #27476 to 2015.5
This commit is contained in:
Colton Myers 2015-10-05 15:17:59 -06:00
commit 5b88c55cc3

View file

@ -396,7 +396,7 @@ class DownloadWindowsDlls(Command):
from contextlib import closing
with closing(requests.get(furl, stream=True)) as req:
if req.status_code == 200:
with open(fdest, 'w') as wfh:
with open(fdest, 'wb') as wfh:
for chunk in req.iter_content(chunk_size=4096):
if chunk: # filter out keep-alive new chunks
wfh.write(chunk)
@ -411,7 +411,7 @@ class DownloadWindowsDlls(Command):
req = urlopen(furl)
if req.getcode() == 200:
with open(fdest, 'w') as wfh:
with open(fdest, 'wb') as wfh:
while True:
for chunk in req.read(4096):
if not chunk: