(plugin_manager)
Ensure we have a config.yaml present
Ensure we have a config.yaml present
Ensure we have a config . yaml present
def ensure_config_yaml(plugin_manager):
    """
    Ensure we have a config.yaml present
    """
    # ensure config dir exists and is private
    for path in [CONFIG_DIR, os.path.join(CONFIG_DIR, "jupyterhub_config.d")]:
        os.makedirs(path, mode=0o700, exist_ok=True)

    migrator.migrate_config_files()

    if os.path.exists(CONFIG_FILE):
        with open(CONFIG_FILE) as f:
            config = yaml.load(f)
    else:
        config = {}

    hook = plugin_manager.hook
    hook.tljh_config_post_install(config=config)

    with open(CONFIG_FILE, "w+") as f:
        yaml.dump(config, f)
def ensure_config_yaml ( plugin_manager ) : # ensure config dir exists and is private for path in [ CONFIG_DIR , os . path . join ( CONFIG_DIR , "jupyterhub_config.d" ) ] : os . makedirs ( path , mode = 0o700 , exist_ok = True ) migrator . migrate_config_files ( ) if os . path . exists ( CONFIG_FILE ) : with open ( CONFIG_FILE ) as f : config = yaml . load ( f ) else : config = { } hook = plugin_manager . hook hook . tljh_config_post_install ( config = config ) with open ( CONFIG_FILE , "w+" ) as f : yaml . dump ( config , f )