mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Flush conda installer to disk before calculating sha
This commit is contained in:
@@ -51,6 +51,8 @@ def download_miniconda_installer(installer_url, sha256sum):
|
||||
"""
|
||||
with tempfile.NamedTemporaryFile('wb') as f:
|
||||
f.write(requests.get(installer_url).content)
|
||||
f.flush()
|
||||
os.fsync()
|
||||
|
||||
if sha256_file(f.name) != sha256sum:
|
||||
raise Exception('sha256sum hash mismatch! Downloaded file corrupted')
|
||||
|
||||
Reference in New Issue
Block a user