summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflu0r1ne <flu0r1ne@flu0r1ne.net>2022-09-26 03:34:48 -0500
committerflu0r1ne <flu0r1ne@flu0r1ne.net>2022-09-26 03:34:48 -0500
commitec22cca1493b282032cbc3c7bd534cd01b94e009 (patch)
tree42063cdb6cead02db31331434bbdcbba2dece395
parent7c7711f8da40ce930c48387afe671f2e465f937a (diff)
downloadgiab_index_autodl-ec22cca1493b282032cbc3c7bd534cd01b94e009.tar.xz
giab_index_autodl-ec22cca1493b282032cbc3c7bd534cd01b94e009.zip
Ensure files exist prior to md5sumHEADmain
-rwxr-xr-xclnindexdl.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/clnindexdl.py b/clnindexdl.py
index 69a4a10..16f88d8 100755
--- a/clnindexdl.py
+++ b/clnindexdl.py
@@ -32,11 +32,15 @@ def wget_and_verify( ftp_url, md5, output_dir ):
filename = output_dir / basename
- sums = md5sum(filename)
+ q = Path(filename)
- if sums == md5:
- print(f'[{filename}] skipping already exists')
- return
+ if q.exists():
+
+ sums = md5sum(filename)
+
+ if sums == md5:
+ print(f'[{filename}] skipping already exists')
+ return
print(f'[{filename}] : starting download')