mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
use load_config to load config in jupyterhub_config.py
rather than re-implementing it
This commit is contained in:
@@ -54,13 +54,8 @@ c.SystemdSpawner.default_shell = '/bin/bash'
|
|||||||
# Drop the '-singleuser' suffix present in the default template
|
# Drop the '-singleuser' suffix present in the default template
|
||||||
c.SystemdSpawner.unit_name_template = 'jupyter-{USERNAME}'
|
c.SystemdSpawner.unit_name_template = 'jupyter-{USERNAME}'
|
||||||
|
|
||||||
config_overrides_path = os.path.join(CONFIG_DIR, 'config.yaml')
|
tljh_config = configurer.load_config()
|
||||||
if os.path.exists(config_overrides_path):
|
configurer.apply_config(tljh_config, c)
|
||||||
with open(config_overrides_path) as f:
|
|
||||||
config_overrides = yaml.load(f)
|
|
||||||
else:
|
|
||||||
config_overrides = {}
|
|
||||||
configurer.apply_config(config_overrides, c)
|
|
||||||
|
|
||||||
# Load arbitrary .py config files if they exist.
|
# Load arbitrary .py config files if they exist.
|
||||||
# This is our escape hatch
|
# This is our escape hatch
|
||||||
|
|||||||
Reference in New Issue
Block a user