mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-22 04:49:00 +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
|
import time
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
from distutils.version import StrictVersion as V
|
||||||
|
|
||||||
import serial
|
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
|
# Adding pexpect exceptions into this module's namespace
|
||||||
from pexpect import EOF, TIMEOUT # NOQA pylint: disable=W0611
|
from pexpect import EOF, TIMEOUT # NOQA pylint: disable=W0611
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user