From 3c09577ed02e407b454e1b96de580072ee11647c Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 29 Mar 2016 14:39:55 +0800 Subject: [PATCH] device/thorlabs_tcube: fix port read --- artiq/devices/thorlabs_tcube/driver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/devices/thorlabs_tcube/driver.py b/artiq/devices/thorlabs_tcube/driver.py index 061741a23..545887e18 100644 --- a/artiq/devices/thorlabs_tcube/driver.py +++ b/artiq/devices/thorlabs_tcube/driver.py @@ -193,12 +193,12 @@ class _Tcube: await self.port.write(message.pack()) async def recv(self): - header = await self.port.read(6) + header = await self.port.read_exactly(6) logger.debug("received header: %s", header) data = b"" if header[4] & 0x80: (length, ) = st.unpack("