aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/ssh.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2016-12-15 10:52:33 +0100
committerTibor Frank <tifrank@cisco.com>2016-12-16 08:35:32 +0100
commitcf561a6e3d4c4fbd78ab6c9d0a9aa817bb3300fc (patch)
tree0b4d5d2dbda78223d77d76e237285396d42c868e /resources/libraries/python/ssh.py
parent677ae40a2be6db9f49b19ada3c4299a8904f7784 (diff)
Pylint fixes
- Fix PyLint errors - Fix comments in touched python modules Change-Id: I26db2d292a41969cf38b9b0bdd49c4fb15349102 Signed-off-by: Tibor Frank <tifrank@cisco.com>
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