From 18eeb962fe9213be41fffac0e0fc8a5a6f5824e0 Mon Sep 17 00:00:00 2001 From: Aditya Bansal Date: Fri, 16 Jun 2017 14:31:16 +0530 Subject: [PATCH] setup-static-analysis: Add wrapper to retry dependancy installation. --- tools/travis/setup-static-analysis | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/travis/setup-static-analysis b/tools/travis/setup-static-analysis index 32e83586d6..347f100a47 100755 --- a/tools/travis/setup-static-analysis +++ b/tools/travis/setup-static-analysis @@ -4,5 +4,13 @@ set -x # We only need mypy and the python 3 compatibility checkers in this # build, so we just install those directly, skipping provision. -pip install --no-deps -r requirements/mypy.txt -pip install --no-deps -r requirements/py3k.txt + +if ! pip install --no-deps -r requirements/mypy.txt; then + echo "\`pip install --no-deps -r requirements/mypy.txt\`: Failure occured while trying to perform dependancy installation, Retrying..." + pip install --no-deps -r requirements/mypy.txt +fi + +if ! pip install --no-deps -r requirements/py3k.txt; then + echo "\`pip install --no-deps -r requirements/py3k.txt\`: Failure occured while trying to perform dependancy installation, Retrying..." + pip install --no-deps -r requirements/py3k.txt +fi