Fix nxos_file_copy argument error handling. (#65861)

*  Use `option_type` instead of `type` for error
   handling in task options
This commit is contained in:
Ganesh Nalawade 2019-12-16 13:05:18 +05:30 committed by Abhijeet Kasurde
parent dac3bf5b71
commit 06d997b2b2

View file

@ -85,7 +85,7 @@ class ActionModule(ActionBase):
elif option_type == 'path':
playvals[key] = validation.check_type_path(playvals[key])
else:
raise AnsibleError('Unrecognized type <{0}> for playbook parameter <{1}>'.format(type, key))
raise AnsibleError('Unrecognized type <{0}> for playbook parameter <{1}>'.format(option_type, key))
except (TypeError, ValueError) as e:
raise AnsibleError("argument %s is of type %s and we were unable to convert to %s: %s"