show summary when file download fails and delete broken files.
This commit is contained in:
parent
d5ac5cd427
commit
6a2810f603
@ -145,6 +145,9 @@ class DownloadCommand(BaseCommand):
|
||||
try:
|
||||
file_api.download(info.file, info.path)
|
||||
except Exception:
|
||||
print(f"Failed: ${info.path}")
|
||||
if os.path.isfile(info.path):
|
||||
os.remove(info.path)
|
||||
return False
|
||||
print(info.path)
|
||||
return True
|
||||
|
Loading…
x
Reference in New Issue
Block a user