sanitycheck: make pyserial optional
We only need pyserial python module if we are doing device testing. Treat it similar to how we treat tabulate module. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
d62dfe8d0e
commit
b81eec951b
1 changed files with 5 additions and 1 deletions
|
@ -185,7 +185,6 @@ import time
|
||||||
import csv
|
import csv
|
||||||
import yaml
|
import yaml
|
||||||
import glob
|
import glob
|
||||||
import serial
|
|
||||||
import concurrent
|
import concurrent
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
import logging
|
import logging
|
||||||
|
@ -195,6 +194,11 @@ from itertools import islice
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from distutils.spawn import find_executable
|
from distutils.spawn import find_executable
|
||||||
|
|
||||||
|
try:
|
||||||
|
import serial
|
||||||
|
except ImportError:
|
||||||
|
print("Install pyserial python module with pip to use --device-testing option.")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from anytree import Node, RenderTree, find
|
from anytree import Node, RenderTree, find
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue