diff --git a/os_user_tools/ip_trace.py b/os_user_tools/ip_trace.py index 2ecbdf9..90e462f 100644 --- a/os_user_tools/ip_trace.py +++ b/os_user_tools/ip_trace.py @@ -50,8 +50,12 @@ def get_session(): "the %s via env[%s].\n" % (key, env) ) return None + if OS_CACERT in os.environ: + verify = os.environ['OS_CACERT'] + else: + verify = True auth = v3.Password(**auth_parameters) - keystone_session = session.Session(auth=auth) + keystone_session = session.Session(auth=auth, verify=verify) return keystone_session diff --git a/os_user_tools/user_info.py b/os_user_tools/user_info.py index eb16699..371a28c 100644 --- a/os_user_tools/user_info.py +++ b/os_user_tools/user_info.py @@ -44,7 +44,7 @@ def get_session(): "via env[%s].\n" % env ) return None - if os.environ.has_key('OS_CACERT'): + if 'OS_CACERT' in os.environ: verify = os.environ['OS_CACERT'] else: verify = True