From 9fdd9061d3f7dd5bc63f77dd5e5f54283574d508 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bonicoli Date: Wed, 11 Mar 2020 17:20:18 +0100 Subject: [PATCH] Remove extraneous call to bool built-in function --- awx/main/credential_plugins/hashivault.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/awx/main/credential_plugins/hashivault.py b/awx/main/credential_plugins/hashivault.py index 41213f45cd..dccc6b30ae 100644 --- a/awx/main/credential_plugins/hashivault.py +++ b/awx/main/credential_plugins/hashivault.py @@ -109,10 +109,10 @@ hashi_ssh_inputs['required'].extend(['public_key', 'role']) def handle_auth(**kwargs): result = None - if bool(kwargs.get('token')): + if kwargs.get('token'): result = kwargs['token'] else: - if bool(kwargs.get('role_id')) and bool(kwargs.get('secret_id')): + if kwargs.get('role_id') and kwargs.get('secret_id'): result = approle_auth(**kwargs) else: raise Exception('Either Vault token or Auth parameters must be set') @@ -124,7 +124,7 @@ def approle_auth(**kwargs): secret_id = kwargs['secret_id'] auth_path = "approle" - if bool(kwargs.get('auth_path')): + if kwargs.get('auth_path'): auth_path = kwargs.get('auth_path', "approle") url = urljoin(kwargs['url'], 'v1')