diff --git a/oml/update.py b/oml/update.py index c265f63..566d66b 100644 --- a/oml/update.py +++ b/oml/update.py @@ -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...')