From cddeddac8d3fbbfdd81517d7ce8b173f1a526a4e Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 31 Jan 2015 09:52:03 -0800 Subject: [PATCH] For backwards compat, have http load frontend/api --- homeassistant/components/http/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/http/__init__.py b/homeassistant/components/http/__init__.py index 2691e693eb5..8e957b3be7c 100644 --- a/homeassistant/components/http/__init__.py +++ b/homeassistant/components/http/__init__.py @@ -85,6 +85,7 @@ import homeassistant as ha from homeassistant.const import SERVER_PORT, AUTH_HEADER import homeassistant.remote as rem import homeassistant.util as util +import homeassistant.bootstrap as bootstrap DOMAIN = "http" DEPENDENCIES = [] @@ -181,6 +182,11 @@ class HomeAssistantHTTPServer(ThreadingMixIn, HTTPServer): _LOGGER.info( "Starting web interface at http://%s:%d", *self.server_address) + # 31-1-2015: Refactored frontend/api components out of this component + # To prevent stuff from breaking, load the two extracted components + bootstrap.setup_component(self.hass, 'api') + bootstrap.setup_component(self.hass, 'frontend') + self.serve_forever() def register_path(self, method, url, callback, require_auth=True): @@ -188,7 +194,7 @@ class HomeAssistantHTTPServer(ThreadingMixIn, HTTPServer): self.paths.append((method, url, callback, require_auth)) -# pylint: disable=too-many-public-methods +# pylint: disable=too-many-public-methods,too-many-locals class RequestHandler(SimpleHTTPRequestHandler): """ Handles incoming HTTP requests