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:
parent
dac3bf5b71
commit
06d997b2b2
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ class ActionModule(ActionBase):
|
||||||
elif option_type == 'path':
|
elif option_type == 'path':
|
||||||
playvals[key] = validation.check_type_path(playvals[key])
|
playvals[key] = validation.check_type_path(playvals[key])
|
||||||
else:
|
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:
|
except (TypeError, ValueError) as e:
|
||||||
raise AnsibleError("argument %s is of type %s and we were unable to convert to %s: %s"
|
raise AnsibleError("argument %s is of type %s and we were unable to convert to %s: %s"
|
||||||
|
|
Loading…
Reference in a new issue