give up if download fails multiple times
This commit is contained in:
parent
554e65cbd3
commit
616a06270d
1 changed files with 3 additions and 1 deletions
|
@ -333,7 +333,9 @@ class Update(Thread):
|
|||
def install(self):
|
||||
while update_available():
|
||||
self.status('Downloading...')
|
||||
while not download():
|
||||
max_retry = 5
|
||||
while max_retry > 0 and not download():
|
||||
max_retry -= 1
|
||||
self.status('Download failed, retrying...')
|
||||
time.sleep(5)
|
||||
self.status('Downloading...')
|
||||
|
|
Loading…
Reference in a new issue