From 06d997b2b2c3034dd5d567127df54b93f8ee0f34 Mon Sep 17 00:00:00 2001 From: Ganesh Nalawade Date: Mon, 16 Dec 2019 13:05:18 +0530 Subject: [PATCH] Fix nxos_file_copy argument error handling. (#65861) * Use `option_type` instead of `type` for error handling in task options --- lib/ansible/plugins/action/nxos_file_copy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/action/nxos_file_copy.py b/lib/ansible/plugins/action/nxos_file_copy.py index d33a88c7876..74ab9289958 100644 --- a/lib/ansible/plugins/action/nxos_file_copy.py +++ b/lib/ansible/plugins/action/nxos_file_copy.py @@ -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"