Remove distutils strtobool

This import takes a ridiculously long time just to implement a function
that can be done in one line in O(1) time.
This commit is contained in:
Joshua Boniface 2025-03-12 23:09:44 -04:00
parent ee055bdb81
commit a2fed1885c

View File

@ -20,7 +20,6 @@
############################################################################### ###############################################################################
from click import echo as click_echo from click import echo as click_echo
from distutils.util import strtobool
from json import load as jload from json import load as jload
from json import dump as jdump from json import dump as jdump
from os import chmod, environ, getpid, path, get_terminal_size from os import chmod, environ, getpid, path, get_terminal_size
@ -150,9 +149,7 @@ def get_config(store_data, connection=None):
if connection == "local": if connection == "local":
config["verify_ssl"] = False config["verify_ssl"] = False
else: else:
config["verify_ssl"] = bool( config["verify_ssl"] = environ.get("PVC_CLIENT_VERIFY_SSL", "True") == "True"
strtobool(environ.get("PVC_CLIENT_VERIFY_SSL", "True"))
)
return config return config