mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #27686 from rallytime/bp-27476
Back-port #27476 to 2015.5
This commit is contained in:
commit
5b88c55cc3
1 changed files with 2 additions and 2 deletions
4
setup.py
4
setup.py
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue