From 04195cf311dc2b4e8ea330b8d643138cfa8f5364 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Mon, 2 Oct 2023 09:41:56 +0200 Subject: [PATCH] add removing on fail download --- commands/tinfoil.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/tinfoil.py b/commands/tinfoil.py index 7cea83a..3cebbf8 100755 --- a/commands/tinfoil.py +++ b/commands/tinfoil.py @@ -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)