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
... | ... |
@@ -42,6 +42,15 @@ function get_versions { |
42 | 42 |
|
43 | 43 |
|
44 | 44 |
function install_get_pip { |
45 |
+ # If get-pip.py isn't python, delete it. This was probably an |
|
46 |
+ # outage on the server. |
|
47 |
+ if [[ -r $LOCAL_PIP ]]; then |
|
48 |
+ if ! head -1 $LOCAL_PIP | grep -q '#!/usr/bin/env python'; then |
|
49 |
+ echo "WARNING: Corrupt $LOCAL_PIP found removing" |
|
50 |
+ rm $LOCAL_PIP |
|
51 |
+ fi |
|
52 |
+ fi |
|
53 |
+ |
|
45 | 54 |
# The OpenStack gate and others put a cached version of get-pip.py |
46 | 55 |
# for this to find, explicitly to avoid download issues. |
47 | 56 |
# |