show summary when file download fails and delete broken files.

This commit is contained in:
Yoshihiro OKUMURA 2024-12-23 13:58:14 +09:00
parent d5ac5cd427
commit 6a2810f603
Signed by: orrisroot
GPG Key ID: 470AA444C92904B2

View File

@ -145,6 +145,9 @@ class DownloadCommand(BaseCommand):
try: try:
file_api.download(info.file, info.path) file_api.download(info.file, info.path)
except Exception: except Exception:
print(f"Failed: ${info.path}")
if os.path.isfile(info.path):
os.remove(info.path)
return False return False
print(info.path) print(info.path)
return True return True