1
0
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:
Douglas Raillard 2023-06-26 10:45:18 +01:00 committed by Marc Bonnici
parent fe28e086c2
commit 306fd0624c

View File

@ -42,11 +42,13 @@ logging.getLogger("paramiko").setLevel(logging.WARNING)
# pylint: disable=import-error,wrong-import-position,ungrouped-imports,wrong-import-order # pylint: disable=import-error,wrong-import-position,ungrouped-imports,wrong-import-order
import pexpect import pexpect
from distutils.version import StrictVersion as V
if V(pexpect.__version__) < V('4.0.0'): try:
import pxssh
else:
from pexpect import pxssh from pexpect import pxssh
# pexpect < 4.0.0 does not have a pxssh module
except ImportError:
import pxssh
from pexpect import EOF, TIMEOUT, spawn from pexpect import EOF, TIMEOUT, spawn
# pylint: disable=redefined-builtin,wrong-import-position # pylint: disable=redefined-builtin,wrong-import-position