Skip to content

Commit

Permalink
Add the ability to use the OS_CERT variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Pansanel committed Dec 13, 2016
1 parent 0604809 commit 4e1703e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion os_user_tools/ip_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion os_user_tools/user_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4e1703e

Please sign in to comment.