1
0
Fork 0
mirror of synced 2024-05-29 16:40:06 +12:00

Do not try again if the connection was reset

This commit is contained in:
Ali 2020-07-09 17:05:52 +03:00
parent 9d2b92f370
commit 88a74ee26a

View file

@ -96,9 +96,8 @@ def getFile(filename,shortFilename,folderDir,imageURL,indent=0, silent=False):
os.rename(tempDir,fileDir)
if not silent: print(" "*indent+"Downloaded"+" "*10)
return None
except ConnectionResetError as exception:
if not silent: print(" "*indent + str(exception))
if not silent: print(" "*indent + "Trying again\n")
except ConnectionResetError:
raise FailedToDownload
except FileNotFoundError:
filename = shortFilename
else: