mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 20:09:11 +00:00
serial_port: updating to handle newer versions of pexpect
from version 4.0.0 onwards, fdpexpect is now namespaced under the main pexpect libarary, rather than being stand-alone.
This commit is contained in:
parent
7546232c10
commit
691c380779
@ -16,9 +16,15 @@
|
||||
|
||||
import time
|
||||
from contextlib import contextmanager
|
||||
from distutils.version import StrictVersion as V
|
||||
|
||||
import serial
|
||||
import fdpexpect
|
||||
import pexpect
|
||||
if V(pexpect.__version__) < V('4.0.0'):
|
||||
import fdpexpect # pylint: disable=import-error
|
||||
else:
|
||||
from pexpect import fdpexpect
|
||||
|
||||
# Adding pexpect exceptions into this module's namespace
|
||||
from pexpect import EOF, TIMEOUT # NOQA pylint: disable=W0611
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user