Browse code

lib/tls: use python3 to run inline script

We only need to run this fixup for the active python now we are 3 only.

Change-Id: I7616e5ee5693b2890fb7f6bd9052890a82904c22

Ian Wienand authored on 2020/04/16 12:06:07
Showing 2 changed files
... ...
@@ -369,8 +369,7 @@ function deploy_int_CA {
369 369
 function fix_system_ca_bundle_path {
370 370
     if is_service_enabled tls-proxy; then
371 371
         local capath
372
-        local python_cmd=${1:-python}
373
-        capath=$($python_cmd -c $'try:\n from requests import certs\n print (certs.where())\nexcept ImportError: pass')
372
+        capath=$(python3 -c $'try:\n from requests import certs\n print (certs.where())\nexcept ImportError: pass')
374 373
 
375 374
         if [[ ! $capath == "" && ! $capath =~ ^/etc/.* && ! -L $capath ]]; then
376 375
             if is_fedora; then
... ...
@@ -968,9 +968,6 @@ fi
968 968
 
969 969
 if is_service_enabled tls-proxy; then
970 970
     fix_system_ca_bundle_path
971
-    if python3_enabled ; then
972
-        fix_system_ca_bundle_path python3
973
-    fi
974 971
 fi
975 972
 
976 973
 # Extras Install