Handle config.yaml file missing

This commit is contained in:
yuvipanda
2018-06-27 03:20:02 -07:00
parent 12698a20ed
commit c1fcf414d5

View File

@@ -31,12 +31,12 @@ default = {
def apply_yaml_config(path, c):
if not os.path.exists(path):
if os.path.exists(path):
with open(path) as f:
tljh_config = _merge_dictionaries(yaml.safe_load(f), default)
else:
tljh_config = copy.deepcopy(default)
with open(path) as f:
tljh_config = _merge_dictionaries(yaml.safe_load(f), default)
update_auth(c, tljh_config)
update_userlists(c, tljh_config)
update_limits(c, tljh_config)