1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-07-01 20:32:35 +00:00

temp: remove Timeout as it does not exists in used version of THP

This commit is contained in:
M1nd3r 2025-03-20 12:16:54 +01:00
parent f93e754ae8
commit 44a08708f2

View File

@ -27,7 +27,7 @@ from construct_classes import Struct
from ..log import DUMP_PACKETS from ..log import DUMP_PACKETS
from ..tools import EnumAdapter from ..tools import EnumAdapter
from . import Timeout, Transport, TransportException from . import Transport, TransportException
from .udp import UdpTransport from .udp import UdpTransport
if TYPE_CHECKING: if TYPE_CHECKING:
@ -197,7 +197,7 @@ class EmuBleTransport(Transport):
break break
except socket.timeout: except socket.timeout:
if timeout is not None and time.time() - start > timeout: if timeout is not None and time.time() - start > timeout:
raise Timeout(f"Timeout reading UDP packet ({timeout}s)") raise Exception(f"Timeout reading UDP packet ({timeout}s)")
LOG.log(DUMP_PACKETS, f"received packet: {chunk.hex()}") LOG.log(DUMP_PACKETS, f"received packet: {chunk.hex()}")
if len(chunk) != 64: if len(chunk) != 64:
raise TransportException(f"Unexpected chunk size: {len(chunk)}") raise TransportException(f"Unexpected chunk size: {len(chunk)}")
@ -216,7 +216,7 @@ class EmuBleTransport(Transport):
break break
elapsed = time.monotonic() - start elapsed = time.monotonic() - start
if elapsed >= timeout: if elapsed >= timeout:
raise Timeout("Timed out waiting for connection.") raise Exception("Timed out waiting for connection.")
time.sleep(0.05) time.sleep(0.05)
finally: finally: