Check the config value for core.ssl_verify (#651)

This commit is contained in:
José Armando García Sancio
2016-06-09 10:43:10 -07:00
committed by tamarrow
parent 00406f4a48
commit 6031c4dda8
2 changed files with 5 additions and 5 deletions

View File

@@ -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)

View File

@@ -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