summaryrefslogtreecommitdiff
path: root/cts/common/board.py
diff options
context:
space:
mode:
Diffstat (limited to 'cts/common/board.py')
-rw-r--r--cts/common/board.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/cts/common/board.py b/cts/common/board.py
index 090b3eb931..e56ec47b2d 100644
--- a/cts/common/board.py
+++ b/cts/common/board.py
@@ -81,8 +81,7 @@ class Board(object):
List of serials
"""
usb_args = ['lsusb', '-v', '-d', '0x0483:0x374b']
- usb_process = sp.Popen(usb_args, stdout=sp.PIPE, shell=False)
- st_link_info = usb_process.communicate()[0]
+ st_link_info = sp.check_output(usb_args)
st_serials = []
for line in st_link_info.split('\n'):
if 'iSerial' not in line:
@@ -254,6 +253,10 @@ class Board(object):
fcntl.fcntl(fd, fcntl.F_SETFL, flag | os.O_NONBLOCK)
return fd
+ def close_tty(self):
+ """Close tty"""
+ os.close(self.tty)
+
class TestHarness(Board):
"""Subclass of Board representing a Test Harness.