mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Use builtin TimeoutError [core + helpers] (#109684)
This commit is contained in:
@@ -4,7 +4,6 @@ detect_location_info and elevation are mocked by default during tests.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from functools import lru_cache
|
||||
import math
|
||||
from typing import Any, NamedTuple
|
||||
@@ -165,7 +164,7 @@ async def _get_whoami(session: aiohttp.ClientSession) -> dict[str, Any] | None:
|
||||
resp = await session.get(
|
||||
WHOAMI_URL_DEV if HA_VERSION.endswith("0.dev0") else WHOAMI_URL, timeout=30
|
||||
)
|
||||
except (aiohttp.ClientError, asyncio.TimeoutError):
|
||||
except (aiohttp.ClientError, TimeoutError):
|
||||
return None
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user