Revert "Ensure frontend is available if integrations fail to start - Part 1 of 2 (#36093)" (#36251)

This reverts commit fbe7b4ddfa.
This commit is contained in:
Pascal Vizeli authored and GitHub committed 2020-05-29 10:18:39 +02:00
1 parent 08f2714e57
commit ed014e3c96
13 files changed
+63 -173

No files matched your search

+3 -3
View File
@@ -14,7 +14,7 @@ from aiohttp.web_exceptions import (
import voluptuous as vol
from homeassistant import exceptions
from homeassistant.const import CONTENT_TYPE_JSON, HTTP_OK, HTTP_SERVICE_UNAVAILABLE
from homeassistant.const import CONTENT_TYPE_JSON, HTTP_OK
from homeassistant.core import Context, is_callback
from homeassistant.helpers.json import JSONEncoder
@@ -107,8 +107,8 @@ def request_handler_factory(view: HomeAssistantView, handler: Callable) -> Calla
async def handle(request: web.Request) -> web.StreamResponse:
"""Handle incoming request."""
if request.app[KEY_HASS].is_stopping:
return web.Response(status=HTTP_SERVICE_UNAVAILABLE)
if not request.app[KEY_HASS].is_running:
return web.Response(status=503)
authenticated = request.get(KEY_AUTHENTICATED, False)