Skip to content
Snippets Groups Projects
Unverified Commit 2e79db36 authored by Artur Pragacz's avatar Artur Pragacz Committed by GitHub
Browse files

Fix hass stop in bootstrap (#132795)

parent 37213503
No related branches found
No related tags found
No related merge requests found
...@@ -299,14 +299,6 @@ async def async_setup_hass( ...@@ -299,14 +299,6 @@ async def async_setup_hass(
return hass return hass
async def stop_hass(hass: core.HomeAssistant) -> None:
"""Stop hass."""
# Ask integrations to shut down. It's messy but we can't
# do a clean stop without knowing what is broken
with contextlib.suppress(TimeoutError):
async with hass.timeout.async_timeout(10):
await hass.async_stop()
hass = await create_hass() hass = await create_hass()
if runtime_config.skip_pip or runtime_config.skip_pip_packages: if runtime_config.skip_pip or runtime_config.skip_pip_packages:
...@@ -345,7 +337,7 @@ async def async_setup_hass( ...@@ -345,7 +337,7 @@ async def async_setup_hass(
if config_dict is None: if config_dict is None:
recovery_mode = True recovery_mode = True
await stop_hass(hass) await hass.async_stop(force=True)
hass = await create_hass() hass = await create_hass()
elif not basic_setup_success: elif not basic_setup_success:
...@@ -353,7 +345,7 @@ async def async_setup_hass( ...@@ -353,7 +345,7 @@ async def async_setup_hass(
"Unable to set up core integrations. Activating recovery mode" "Unable to set up core integrations. Activating recovery mode"
) )
recovery_mode = True recovery_mode = True
await stop_hass(hass) await hass.async_stop(force=True)
hass = await create_hass() hass = await create_hass()
elif any( elif any(
...@@ -368,7 +360,7 @@ async def async_setup_hass( ...@@ -368,7 +360,7 @@ async def async_setup_hass(
old_logging = hass.data.get(DATA_LOGGING) old_logging = hass.data.get(DATA_LOGGING)
recovery_mode = True recovery_mode = True
await stop_hass(hass) await hass.async_stop(force=True)
hass = await create_hass() hass = await create_hass()
if old_logging: if old_logging:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment