mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix download when requests not present
This commit is contained in:
parent
b4479bff5f
commit
dc1988add5
1 changed files with 6 additions and 6 deletions
12
setup.py
12
setup.py
|
@ -429,7 +429,7 @@ class DownloadWindowsDlls(Command):
|
|||
import platform
|
||||
from pip.utils.logging import indent_log
|
||||
platform_bits, _ = platform.architecture()
|
||||
url = 'https://repo.saltstack.com/windows/dependencies/{bits}/{fname}.dll'
|
||||
url = 'http://repo.saltstack.com/windows/dependencies/{bits}/{fname}.dll'
|
||||
dest = os.path.join(os.path.dirname(sys.executable), '{fname}.dll')
|
||||
with indent_log():
|
||||
for fname in ('libeay32', 'ssleay32', 'libsodium', 'msvcr120'):
|
||||
|
@ -459,11 +459,11 @@ class DownloadWindowsDlls(Command):
|
|||
if req.getcode() == 200:
|
||||
with open(fdest, 'wb') as wfh:
|
||||
while True:
|
||||
for chunk in req.read(4096):
|
||||
if not chunk:
|
||||
break
|
||||
wfh.write(chunk)
|
||||
wfh.flush()
|
||||
chunk = req.read(4096)
|
||||
if not chunk:
|
||||
break
|
||||
wfh.write(chunk)
|
||||
wfh.flush()
|
||||
else:
|
||||
log.error(
|
||||
'Failed to download {0}.dll to {1} from {2}'.format(
|
||||
|
|
Loading…
Add table
Reference in a new issue