aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2024-06-03 15:49:14 +0200
committerGuilhem Moulin <guilhem@fripost.org>2024-06-03 16:13:50 +0200
commita22de279bb6ae83459c766f50b9b0bb0eb707b16 (patch)
tree3ce1ea1fc91cfd443735441cd70323b2c09551dc
parenta4b89802a2d8019f218e94d2f0a14fb466d1ad56 (diff)
webmap-download: Improve comment.
-rwxr-xr-xwebmap-download1
1 files changed, 1 insertions, 0 deletions
diff --git a/webmap-download b/webmap-download
index 0165462..c2178f5 100755
--- a/webmap-download
+++ b/webmap-download
@@ -103,6 +103,7 @@ def download(url, dest, dir_fd=None, headers={}, session=requests, progress=None
pbar.close()
try:
+ # atomic rename (ensures output is never partially written)
os.rename(dest_tmp, dest, src_dir_fd=dir_fd, dst_dir_fd=dir_fd)
except (OSError, ValueError) as e:
try: