Browse code

Merge "Use proper python when configuring certs"

Jenkins authored on 2017/06/01 04:59:59
Showing 2 changed files
... ...
@@ -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
... ...
@@ -894,6 +894,9 @@ fi
894 894
 
895 895
 if is_service_enabled tls-proxy; then
896 896
     fix_system_ca_bundle_path
897
+    if python3_enabled ; then
898
+        fix_system_ca_bundle_path python3
899
+    fi
897 900
 fi
898 901
 
899 902
 # Extras Install