From a2558972b95a4d6ec0dbdd00174cd4fb21f4cf9b Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 16 Mar 2015 21:58:37 -0700 Subject: [PATCH] Empty configuration.yaml no longer crashes setup --- homeassistant/bootstrap.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index 56d77fdcb26..f9a90664ae7 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -119,6 +119,11 @@ def from_config_file(config_path, hass=None): if os.path.splitext(config_path)[1] == '.yaml': # Read yaml config_dict = yaml.load(io.open(config_path, 'r')) + + # If YAML file was empty + if config_dict is None: + config_dict = {} + else: # Read config config = configparser.ConfigParser()