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:
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user