Skip to content

Commit cfd6fdd

Browse files
dimblebyradoering
authored andcommitted
atomic downloads
1 parent 02e5337 commit cfd6fdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/poetry/utils/helpers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def download_file(
121121
# but skip the updating
122122
set_indicator = total_size > 1024 * 1024
123123

124-
with dest.open("wb") as f:
124+
with atomic_open(dest) as f:
125125
for chunk in response.iter_content(chunk_size=chunk_size):
126126
if chunk:
127127
f.write(chunk)

0 commit comments

Comments
 (0)