From c902f2da148ed14006b76a60891340f3f4c00091 Mon Sep 17 00:00:00 2001 From: GGabriele Date: Fri, 2 Sep 2016 18:58:06 +0200 Subject: [PATCH] Fix typo --- lib/ansible/modules/network/nxos/nxos_file_copy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/network/nxos/nxos_file_copy.py b/lib/ansible/modules/network/nxos/nxos_file_copy.py index 6ec37ab3fc..ab187c5466 100644 --- a/lib/ansible/modules/network/nxos/nxos_file_copy.py +++ b/lib/ansible/modules/network/nxos/nxos_file_copy.py @@ -893,8 +893,9 @@ def main(): try: transfer_file(module, dest) transfer_status = 'Sent' - except Exception as e: - module.fail_json(msg=str(e)) + except ShellError: + clie = get_exception() + module.fail_json(msg=str(clie)) if remote_file is None: remote_file = os.path.basename(local_file)