aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/ssh.py
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/python/ssh.py')
-rw-r--r--resources/libraries/python/ssh.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/resources/libraries/python/ssh.py b/resources/libraries/python/ssh.py
index 4b3838bbb7..90ac0be2dc 100644
--- a/resources/libraries/python/ssh.py
+++ b/resources/libraries/python/ssh.py
@@ -301,7 +301,7 @@ def exec_cmd(node, cmd, timeout=600, sudo=False):
ssh = SSH()
try:
ssh.connect(node)
- except Exception as err:
+ except SSHException as err:
logger.error("Failed to connect to node" + str(err))
return None, None, None
@@ -311,7 +311,7 @@ def exec_cmd(node, cmd, timeout=600, sudo=False):
else:
(ret_code, stdout, stderr) = ssh.exec_command_sudo(cmd,
timeout=timeout)
- except Exception as err:
+ except SSHException as err:
logger.error(err)
return None, None, None