1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

fall back main config to empty dict

This commit is contained in:
checktheroads
2020-02-16 18:01:57 -07:00
parent 7b33204fb1
commit 17e8b1c113

View File

@@ -123,7 +123,7 @@ async def _config_main():
try:
async with AIOFile(CONFIG_MAIN, "r") as cf:
raw = await cf.read()
config = yaml.safe_load(raw)
config = yaml.safe_load(raw) or {}
except (yaml.YAMLError, yaml.MarkedYAMLError) as yaml_error:
raise ConfigError(error_msg=str(yaml_error)) from None
return config