Skip to content

Commit

Permalink
fix: raise ConfigEntryNotReady on timeout (#2525)
Browse files Browse the repository at this point in the history
closes #2283
  • Loading branch information
danielbrunt57 authored Sep 16, 2024
1 parent 95f1b16 commit 5464724
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions custom_components/alexa_media/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,14 @@ async def async_setup_entry(hass, config_entry, async_add_devices):
_LOGGER.debug(
"%s: Loading config entry for %s", hide_email(account), component
)
await hass.config_entries.async_forward_entry_setups(
config_entry, [component]
)
try:
await hass.config_entries.async_forward_entry_setups(
config_entry, [component]
)
except (asyncio.TimeoutError, TimeoutException) as ex:
raise ConfigEntryNotReady(
f"Timeout while loading config entry for {component}"
) from ex
return True
raise ConfigEntryNotReady

Expand Down

0 comments on commit 5464724

Please sign in to comment.