From a22de279bb6ae83459c766f50b9b0bb0eb707b16 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Mon, 3 Jun 2024 15:49:14 +0200 Subject: webmap-download: Improve comment. --- webmap-download | 1 + 1 file changed, 1 insertion(+) 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: -- cgit v1.2.3