mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00: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:
parent
b83e51856d
commit
c1d7cfafcc
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user