Merge "Move all opens in auth_token to be in context"
This commit is contained in:
@@ -1231,9 +1231,8 @@ class AuthProtocol(object):
|
|||||||
response, data = self._http_request('GET', path)
|
response, data = self._http_request('GET', path)
|
||||||
|
|
||||||
def write_cert_file(data):
|
def write_cert_file(data):
|
||||||
certfile = open(self.signing_cert_file_name, 'w')
|
with open(self.signing_cert_file_name, 'w') as certfile:
|
||||||
certfile.write(data)
|
certfile.write(data)
|
||||||
certfile.close()
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
#todo check response
|
#todo check response
|
||||||
@@ -1253,9 +1252,8 @@ class AuthProtocol(object):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
#todo check response
|
#todo check response
|
||||||
certfile = open(self.ca_file_name, 'w')
|
with open(self.ca_file_name, 'w') as certfile:
|
||||||
certfile.write(data)
|
certfile.write(data)
|
||||||
certfile.close()
|
|
||||||
except (AssertionError, KeyError):
|
except (AssertionError, KeyError):
|
||||||
self.LOG.warn(
|
self.LOG.warn(
|
||||||
"Unexpected response from keystone service: %s", data)
|
"Unexpected response from keystone service: %s", data)
|
||||||
|
Reference in New Issue
Block a user