mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Handle config.yaml file missing
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user