Simplify test branches

This commit is contained in:
Pierre-Louis Bonicoli 2020-03-11 17:22:43 +01:00 committed by Ryan Petrello
parent 9d85e8655d
commit 139384acc4
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

@ -111,10 +111,9 @@ def handle_auth(**kwargs):
if kwargs.get('token'):
token = kwargs['token']
else:
if kwargs.get('role_id') and kwargs.get('secret_id'):
elif kwargs.get('role_id') and kwargs.get('secret_id'):
token = approle_auth(**kwargs)
else:
else:
raise Exception('Either Vault token or Auth parameters must be set')
return token