From f8626b503241a46bb25015b1e81019be33b8a908 Mon Sep 17 00:00:00 2001 From: Simon Holesch Date: Mon, 15 Jan 2024 17:24:54 +0100 Subject: [PATCH] Agent: Fix handling of USB import timeout The exception handler caught the wrong exception. The error occurs when you try to attach a place, that doesn't have all USB devices available. --- not_my_board/_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/not_my_board/_agent.py b/not_my_board/_agent.py index 893e403..1b78dbb 100644 --- a/not_my_board/_agent.py +++ b/not_my_board/_agent.py @@ -318,7 +318,7 @@ async def __aenter__(self): try: await asyncio.wait_for(ready_event.wait(), self._ready_timeout) - except TimeoutError: + except asyncio.TimeoutError: logger.warning("%s: Attaching USB device timed out", self._name) self._stack = stack.pop_all()