diff --git a/sampleid/inference.py b/sampleid/inference.py index fbc095f..c7b6318 100644 --- a/sampleid/inference.py +++ b/sampleid/inference.py @@ -1,5 +1,6 @@ import os import sys +import shutil import tempfile from urllib.request import urlopen from tqdm import tqdm @@ -35,7 +36,7 @@ def download_file(url: str, path: str): tmp.flush() os.fsync(tmp.fileno()) - os.replace(tmp.name, path) + shutil.move(tmp.name, path) print(f"Downloaded to: {path}")