We have to do silly overrides of cert locations for requests for
reasons. If we are running under python3 then we were previously looking
in the wrong location for the requests certs. Update the cert fixing
function to properly use python3 to find the certs if python3 is
enabled.
Change-Id: Id1369da0d812edcf9b1204e9c567f8bfe77c48b2
... | ... |
@@ -345,7 +345,8 @@ function make_root_CA { |
345 | 345 |
function fix_system_ca_bundle_path { |
346 | 346 |
if is_service_enabled tls-proxy; then |
347 | 347 |
local capath |
348 |
- capath=$(python -c $'try:\n from requests import certs\n print certs.where()\nexcept ImportError: pass') |
|
348 |
+ local python_cmd=${1:-python} |
|
349 |
+ capath=$($python_cmd -c $'try:\n from requests import certs\n print (certs.where())\nexcept ImportError: pass') |
|
349 | 350 |
|
350 | 351 |
if [[ ! $capath == "" && ! $capath =~ ^/etc/.* && ! -L $capath ]]; then |
351 | 352 |
if is_fedora; then |