From 0280f6f6c83b45b06220050e0a9353dfe364ef18 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 7 Oct 2015 09:19:53 -0400 Subject: [PATCH] remove corrupt get-pip.py If get-pip servers fall over and return 503 for a few hours (which they do medium regularly) we'll cache crud html, and everything will suck. We know this script should be python, so if it isn't, delete it. Change-Id: Ia9f6f7c7217939bc1ab5745f4a9d568acfbf04c8 --- tools/install_pip.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/install_pip.sh b/tools/install_pip.sh index 41261800e4..dd4e4339cb 100755 --- a/tools/install_pip.sh +++ b/tools/install_pip.sh @@ -42,6 +42,15 @@ function get_versions { function install_get_pip { + # If get-pip.py isn't python, delete it. This was probably an + # outage on the server. + if [[ -r $LOCAL_PIP ]]; then + if ! head -1 $LOCAL_PIP | grep -q '#!/usr/bin/env python'; then + echo "WARNING: Corrupt $LOCAL_PIP found removing" + rm $LOCAL_PIP + fi + fi + # The OpenStack gate and others put a cached version of get-pip.py # for this to find, explicitly to avoid download issues. #