1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-05 18:30:50 +01:00

utils/ssh: fix pxssh import for pexpect versions >= 4.0

The pexpect module exposes a pxssh class starting from version 4.0.
This patch makes uses of the proper pxssh import statement depending on the
version of pexpect available in the host.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
This commit is contained in:
Patrick Bellasi 2015-10-12 15:25:12 +01:00
parent b83e51856d
commit c1d7cfafcc

View File

@ -23,7 +23,12 @@ import threading
import tempfile
import shutil
import pxssh
import pexpect
from distutils.version import StrictVersion as V
if V(pexpect.__version__) < V('4.0.0'):
import pxssh
else:
from pexpect import pxssh
from pexpect import EOF, TIMEOUT, spawn
from devlib.exception import HostError, TargetError, TimeoutError