add removing on fail download

This commit is contained in:
Michel Roux 2023-10-02 09:41:56 +02:00
parent 0611fb73e8
commit 04195cf311

@ -36,6 +36,8 @@ def download(path, file):
stdout=sys.stdout,
)
except subprocess.CalledProcessError:
print(f"Removing {path}/{file}")
# os.remove(f"{path}/{file}")
print("Waiting for 10 minutes ...")
time.sleep(10 * 60)
download(path, file)