mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-30 10:29:33 +00:00
fix: catch TimeoutError in place of asyncio.TimeoutError
As per docs [1], since python 3.11 wait_for() raises TimeoutError. Since we currently support python 3.10+, we have to catch both. [1]: https://docs.python.org/3.12/library/asyncio-task.html#asyncio.wait_for Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This commit is contained in:
parent
473a07f624
commit
851d0fdc10
3 changed files with 4 additions and 4 deletions
|
|
@ -99,7 +99,7 @@ class ProviderImpl(Providers):
|
|||
try:
|
||||
health = await asyncio.wait_for(impl.health(), timeout=timeout)
|
||||
return api_name, health
|
||||
except asyncio.TimeoutError:
|
||||
except (asyncio.TimeoutError, TimeoutError):
|
||||
return (
|
||||
api_name,
|
||||
HealthResponse(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue