From 98ec15b9706f6a33d2ce1efdca022abd8a94adb9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 13 Jun 2019 10:37:16 +0530 Subject: [PATCH] Retry download on fail --- setup/install.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup/install.py b/setup/install.py index b728a0c52f..2ab8caff8e 100644 --- a/setup/install.py +++ b/setup/install.py @@ -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)):