From 9d85e8655dff554acec7c0b29796547ebb01122a Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bonicoli Date: Wed, 11 Mar 2020 17:21:46 +0100 Subject: [PATCH] Both methods return a token: rename variable --- awx/main/credential_plugins/hashivault.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/awx/main/credential_plugins/hashivault.py b/awx/main/credential_plugins/hashivault.py index dccc6b30ae..0736ccc4f1 100644 --- a/awx/main/credential_plugins/hashivault.py +++ b/awx/main/credential_plugins/hashivault.py @@ -107,17 +107,17 @@ hashi_ssh_inputs['metadata'] = [{ hashi_ssh_inputs['required'].extend(['public_key', 'role']) def handle_auth(**kwargs): - result = None + token = None if kwargs.get('token'): - result = kwargs['token'] + token = kwargs['token'] else: if kwargs.get('role_id') and kwargs.get('secret_id'): - result = approle_auth(**kwargs) + token = approle_auth(**kwargs) else: raise Exception('Either Vault token or Auth parameters must be set') - return result + return token def approle_auth(**kwargs): role_id = kwargs['role_id']