fix exception introduced by the last commit

This commit is contained in:
z4yx 2020-04-25 09:33:44 +08:00
parent 3dfc0c2e1c
commit d8ace87468

View File

@ -80,9 +80,8 @@ def check_and_download(url: str, dst_file: Path, caching = False)->int:
return 0 return 0
except BaseException as e: except BaseException as e:
print(e, flush=True) print(e, flush=True)
if dst_file.is_file(): if dst_file.is_file(): dst_file.unlink()
dst_file.unlink() if url in download_cache: del download_cache[url]
del download_cache[url]
return 1 return 1
def mkdir_with_dot_tmp(folder: Path)->Tuple[Path, Path]: def mkdir_with_dot_tmp(folder: Path)->Tuple[Path, Path]: