Merge "Use proper python when configuring certs"

This commit is contained in:
Jenkins 2017-05-31 19:59:59 +00:00 committed by Gerrit Code Review
commit a718b5ea92
2 changed files with 5 additions and 1 deletions

View File

@ -345,7 +345,8 @@ function make_root_CA {
function fix_system_ca_bundle_path {
if is_service_enabled tls-proxy; then
local capath
capath=$(python -c $'try:\n from requests import certs\n print certs.where()\nexcept ImportError: pass')
local python_cmd=${1:-python}
capath=$($python_cmd -c $'try:\n from requests import certs\n print (certs.where())\nexcept ImportError: pass')
if [[ ! $capath == "" && ! $capath =~ ^/etc/.* && ! -L $capath ]]; then
if is_fedora; then

View File

@ -894,6 +894,9 @@ fi
if is_service_enabled tls-proxy; then
fix_system_ca_bundle_path
if python3_enabled ; then
fix_system_ca_bundle_path python3
fi
fi
# Extras Install