diff options
Diffstat (limited to 'webmap-download')
-rwxr-xr-x | webmap-download | 1 |
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: |