Skip to content
Snippets Groups Projects
Commit 43b8963e authored by Alan De Smet's avatar Alan De Smet
Browse files

Fix handling of file-already-exists-post-lock #18

Was testing the wrong variable for None-ness. The returned file from
atomic.__enter__() will be None if the file already exists, not the
atomic itself.
parent 77f17572
Branches
No related tags found
No related merge requests found
...@@ -472,7 +472,7 @@ def download_all(url_to_dst, download_stats, do_download, timeout): ...@@ -472,7 +472,7 @@ def download_all(url_to_dst, download_stats, do_download, timeout):
for url,dst in url_to_dst.items(): for url,dst in url_to_dst.items():
atomic = AtomicCreateIfMissing(dst) atomic = AtomicCreateIfMissing(dst)
file = atomic.__enter__() file = atomic.__enter__()
if atomic is None: if file is None:
atomic.__exit__(None,None,None) atomic.__exit__(None,None,None)
download_already_present("download_all post-lock", download_already_present("download_all post-lock",
dst, download_stats, do_download) dst, download_stats, do_download)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment