Skip to content

Commit

Permalink
atomic downloads (#7968)
Browse files Browse the repository at this point in the history
(cherry picked from commit c5d2c6b)
  • Loading branch information
dimbleby authored and radoering committed May 20, 2023
1 parent e437103 commit 0c00095
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 0c00095

Please sign in to comment.