Use builtin TimeoutError [core + helpers] (#109684)

This commit is contained in:
Marc Mueller
2024-02-05 12:09:54 +01:00
committed by GitHub
parent a9147cf3dd
commit cd0ee98dba
19 changed files with 70 additions and 74 deletions

View File

@@ -370,7 +370,7 @@ class EntityPlatform:
EVENT_HOMEASSISTANT_STARTED, setup_again
)
return False
except asyncio.TimeoutError:
except TimeoutError:
logger.error(
(
"Setup of platform %s is taking longer than %s seconds."
@@ -513,7 +513,7 @@ class EntityPlatform:
try:
async with self.hass.timeout.async_timeout(timeout, self.domain):
await asyncio.gather(*tasks)
except asyncio.TimeoutError:
except TimeoutError:
self.logger.warning(
"Timed out adding entities for domain %s with platform %s after %ds",
self.domain,