diff --git a/dcos/config.py b/dcos/config.py index 2f6a854..ff172dd 100644 --- a/dcos/config.py +++ b/dcos/config.py @@ -67,7 +67,7 @@ def get_config_val(name, config=None): :param config: config :type config: Toml :returns: value of 'name' parameter - :rtype: object | None + :rtype: str | None """ if config is None: @@ -78,9 +78,9 @@ def get_config_val(name, config=None): env_var = None if section == "CORE": if subkey.startswith("DCOS") and os.environ.get(subkey): - env_var = subkey + env_var = subkey else: - env_var = "DCOS_{}".format(subkey) + env_var = "DCOS_{}".format(subkey) else: env_var = "DCOS_{}_{}".format(section, subkey) diff --git a/dcos/http.py b/dcos/http.py index ffef302..81b99ae 100644 --- a/dcos/http.py +++ b/dcos/http.py @@ -44,9 +44,9 @@ def _verify_ssl(verify=None): if verify is None: verify = config.get_config_val("core.ssl_verify") - if verify.lower() == "true": + if verify and verify.lower() == "true": verify = True - elif verify.lower() == "false": + elif verify and verify.lower() == "false": verify = False return verify