mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Retry download on fail
This commit is contained in:
parent
a3bf706825
commit
98ec15b970
@ -364,7 +364,11 @@ class Bootstrap(Command):
|
||||
import tarfile
|
||||
self.info('Downloading translations...')
|
||||
st = time.time()
|
||||
data = download_securely(tarball_url)
|
||||
try:
|
||||
data = download_securely(tarball_url)
|
||||
except Exception:
|
||||
time.sleep(1)
|
||||
data = download_securely(tarball_url)
|
||||
tarfile.open(fileobj=io.BytesIO(data)).extractall(tdir)
|
||||
x = os.listdir(tdir)[0]
|
||||
for y in os.listdir(os.path.join(tdir, x)):
|
||||
|
Loading…
x
Reference in New Issue
Block a user