summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/network/nxos
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/modules/network/nxos')
-rw-r--r--lib/ansible/modules/network/nxos/nxos_file_copy.py2
-rw-r--r--lib/ansible/modules/network/nxos/nxos_snapshot.py2
2 files changed, 2 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 678aa65389..2c1491e9fd 100644
--- a/lib/ansible/modules/network/nxos/nxos_file_copy.py
+++ b/lib/ansible/modules/network/nxos/nxos_file_copy.py
@@ -268,7 +268,7 @@ def transfer_file_to_device(module, dest):
scp = SCPClient(ssh.get_transport())
try:
scp.put(module.params['local_file'], full_remote_path)
- except:
+ except Exception:
time.sleep(10)
temp_size = verify_remote_file_exists(
module, dest, file_system=module.params['file_system'])
diff --git a/lib/ansible/modules/network/nxos/nxos_snapshot.py b/lib/ansible/modules/network/nxos/nxos_snapshot.py
index ad21459c24..3393087777 100644
--- a/lib/ansible/modules/network/nxos/nxos_snapshot.py
+++ b/lib/ansible/modules/network/nxos/nxos_snapshot.py
@@ -298,7 +298,7 @@ def write_on_file(content, filename, module):
report = open(filepath, 'w')
report.write(content)
report.close()
- except:
+ except Exception:
module.fail_json(msg="Error while writing on file.")
return filepath