Pass timeout to the ksa session too.
For whatever reason the timeout isn't passed on here. I can't think of any reason to not use the timeout here too. Closes: https://bugs.launchpad.net/python-swiftclient/+bug/2126931 Change-Id: Ife99b3bd6610de92233907c9eaf9fa9295cdef2b Signed-off-by: David Svenson <davidsvenson@outlook.com>
This commit is contained in:
@@ -601,7 +601,7 @@ variables to be set or overridden with -A, -U, or -K.''')
|
||||
'application_credential_secret'),
|
||||
application_credential_id=os_options.get(
|
||||
'application_credential_id'))
|
||||
sess = ksa_session.Session(auth=auth)
|
||||
sess = ksa_session.Session(auth=auth, timeout=timeout)
|
||||
token = sess.get_token()
|
||||
except ksauthexceptions.Unauthorized:
|
||||
msg = 'Unauthorized. Check application credential id and secret.'
|
||||
|
@@ -594,8 +594,11 @@ class TestGetAuth(MockHttpTest):
|
||||
|
||||
class FakeKeystoneuth1v3Session:
|
||||
|
||||
def __init__(self, auth):
|
||||
def __init__(self, auth, timeout=None):
|
||||
self.auth = auth
|
||||
self.timeout = None
|
||||
if timeout is not None:
|
||||
self.timeout = float(timeout)
|
||||
self.token = 'token'
|
||||
|
||||
def get_token(self):
|
||||
|
Reference in New Issue
Block a user