mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
devlib/utils/ssh: Avoid using deprecated distutils
This commit is contained in:
parent
fe28e086c2
commit
306fd0624c
@ -42,11 +42,13 @@ logging.getLogger("paramiko").setLevel(logging.WARNING)
|
||||
|
||||
# pylint: disable=import-error,wrong-import-position,ungrouped-imports,wrong-import-order
|
||||
import pexpect
|
||||
from distutils.version import StrictVersion as V
|
||||
if V(pexpect.__version__) < V('4.0.0'):
|
||||
import pxssh
|
||||
else:
|
||||
|
||||
try:
|
||||
from pexpect import pxssh
|
||||
# pexpect < 4.0.0 does not have a pxssh module
|
||||
except ImportError:
|
||||
import pxssh
|
||||
|
||||
from pexpect import EOF, TIMEOUT, spawn
|
||||
|
||||
# pylint: disable=redefined-builtin,wrong-import-position
|
||||
|
Loading…
x
Reference in New Issue
Block a user