mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
Remove extraneous call to bool built-in function
This commit is contained in:
parent
d3d4ce3804
commit
9fdd9061d3
@ -109,10 +109,10 @@ hashi_ssh_inputs['required'].extend(['public_key', 'role'])
|
|||||||
def handle_auth(**kwargs):
|
def handle_auth(**kwargs):
|
||||||
result = None
|
result = None
|
||||||
|
|
||||||
if bool(kwargs.get('token')):
|
if kwargs.get('token'):
|
||||||
result = kwargs['token']
|
result = kwargs['token']
|
||||||
else:
|
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)
|
result = approle_auth(**kwargs)
|
||||||
else:
|
else:
|
||||||
raise Exception('Either Vault token or Auth parameters must be set')
|
raise Exception('Either Vault token or Auth parameters must be set')
|
||||||
@ -124,7 +124,7 @@ def approle_auth(**kwargs):
|
|||||||
secret_id = kwargs['secret_id']
|
secret_id = kwargs['secret_id']
|
||||||
auth_path = "approle"
|
auth_path = "approle"
|
||||||
|
|
||||||
if bool(kwargs.get('auth_path')):
|
if kwargs.get('auth_path'):
|
||||||
auth_path = kwargs.get('auth_path', "approle")
|
auth_path = kwargs.get('auth_path', "approle")
|
||||||
|
|
||||||
url = urljoin(kwargs['url'], 'v1')
|
url = urljoin(kwargs['url'], 'v1')
|
||||||
|
Loading…
Reference in New Issue
Block a user