aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/ssh.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-01-23 10:59:29 +0100
committerTibor Frank <tifrank@cisco.com>2019-01-23 14:45:09 +0000
commit8bac97fb07e863573f5a2914058e1d23229d279b (patch)
tree4fdf647edfe51a72eece45fce70822ef4d4321b9 /resources/libraries/python/ssh.py
parent12b5c1d2de914e8aabb62587028e4e92fd298173 (diff)
Fix PyLint errors
Change-Id: I5a369f4b9f9b478375fda4a634bf57cc9623e972 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/libraries/python/ssh.py')
-rw-r--r--resources/libraries/python/ssh.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/resources/libraries/python/ssh.py b/resources/libraries/python/ssh.py
index 4beec5aa83..a23d163768 100644
--- a/resources/libraries/python/ssh.py
+++ b/resources/libraries/python/ssh.py
@@ -13,15 +13,17 @@
"""Library for SSH connection management."""
-import paramiko
+
import socket
import StringIO
-from paramiko import RSAKey
+from time import time, sleep
+
+from paramiko import RSAKey, SSHClient, AutoAddPolicy
from paramiko.ssh_exception import SSHException, NoValidConnectionsError
from robot.api import logger
from scp import SCPClient
-from time import time, sleep
+
__all__ = ["exec_cmd", "exec_cmd_no_error"]
@@ -86,8 +88,8 @@ class SSH(object):
pkey = RSAKey.from_private_key(
StringIO.StringIO(node['priv_key']))
- self._ssh = paramiko.SSHClient()
- self._ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+ self._ssh = SSHClient()
+ self._ssh.set_missing_host_key_policy(AutoAddPolicy())
self._ssh.connect(node['host'], username=node['username'],
password=node.get('password'), pkey=pkey,