Skip to content

Commit

Permalink
atomic downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed May 20, 2023
1 parent fe045cd commit 76d8c19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/poetry/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 76d8c19

Please sign in to comment.