Commit c5d2c6bd by David Hotham Committed by GitHub

atomic downloads (#7968)

parent 02e5337a
......@@ -121,7 +121,7 @@ def download_file(
# but skip the updating
set_indicator = total_size > 1024 * 1024
with dest.open("wb") as f:
with atomic_open(dest) as f:
for chunk in response.iter_content(chunk_size=chunk_size):
if chunk:
f.write(chunk)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment