Handle exception for credential input checks in calling function

This commit is contained in:
jakemcdermott 2021-12-08 11:34:59 -05:00
parent 1b0fca8026
commit 366d2c1d97
No known key found for this signature in database
GPG Key ID: 0E56ED990CDFCB4F

View File

@ -979,7 +979,7 @@ class BaseTask(object):
if instance.execution_environment.credential:
cred = instance.execution_environment.credential
if cred.has_inputs(field_names=('host', 'username', 'password')):
if all([cred.has_input(field_name) for field_name in ('host', 'username', 'password')]):
host = cred.get_input('host')
username = cred.get_input('username')
password = cred.get_input('password')