mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Load arbitrary .py config files from a conf.d dir
We want to keep the amount of custom code we support extremely small. This provides a nice escape hatch for everything else.
This commit is contained in:
@@ -3,8 +3,8 @@ JupyterHub config for the littlest jupyterhub.
|
|||||||
"""
|
"""
|
||||||
import copy
|
import copy
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
from glob import glob
|
||||||
|
|
||||||
from systemdspawner import SystemdSpawner
|
from systemdspawner import SystemdSpawner
|
||||||
from tljh import user, configurer
|
from tljh import user, configurer
|
||||||
@@ -47,3 +47,9 @@ if os.path.exists(config_overrides_path):
|
|||||||
else:
|
else:
|
||||||
config_overrides = {}
|
config_overrides = {}
|
||||||
configurer.apply_config(config_overrides, c)
|
configurer.apply_config(config_overrides, c)
|
||||||
|
|
||||||
|
# Load arbitrary .py config files if they exist.
|
||||||
|
# This is our escape hatch
|
||||||
|
extra_configs = sorted(glob(os.path.join(INSTALL_PREFIX, 'config.d', '*.py')))
|
||||||
|
for ec in extra_configs:
|
||||||
|
load_subconfig(ec)
|
||||||
|
|||||||
Reference in New Issue
Block a user