diff --git a/atests/nfc_nci/nci_interface.py b/atests/nfc_nci/nci_interface.py index e00474c..81177a4 100644 --- a/atests/nfc_nci/nci_interface.py +++ b/atests/nfc_nci/nci_interface.py @@ -1,5 +1,6 @@ import serial import select +import io import time @@ -34,7 +35,7 @@ def wait_for_data_from_nci(self, timeout: float = 1.0): if self._serial_connection and self._serial_connection.is_open: try: select.select([self._serial_connection.fileno()], [], [], timeout) - except AttributeError: + except io.UnsupportedOperation: # Windows does not support select on serial ports, so we have to do it the hard way endTime = time.time() + timeout while time.time() < endTime and not self._serial_connection.in_waiting: