install_pip: don't fail when not installed

On some platforms, "python -m pip" isn't available.  Currently this is
run undconditionally from the "get_versions" function; remove the call.

Change-Id: I91d6c66d055f02fa7b4368593b629933f82d8117
This commit is contained in:
Ian Wienand 2021-08-10 13:50:08 +10:00
parent 6b9a564622
commit 2df2aa0158
1 changed files with 1 additions and 3 deletions

View File

@ -46,15 +46,13 @@ echo "Distro: $DISTRO"
function get_versions {
# FIXME(dhellmann): Deal with multiple python versions here? This
# is just used for reporting, so maybe not?
PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null || true)
PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null || which pip3 2>/dev/null || true)
if [[ -n $PIP ]]; then
PIP_VERSION=$($PIP --version | awk '{ print $2}')
echo "pip: $PIP_VERSION"
else
echo "pip: Not Installed"
fi
# Show python3 module version
python${PYTHON3_VERSION} -m pip --version
}