mirror of
https://github.com/stellarshenson/stellars-jupyterhub-ds.git
synced 2026-03-08 06:00:29 +00:00
Fixed NameError when custom_handlers.py imports from jupyterhub_config.py by protecting all c.* assignments with 'if c is not None:' checks. Changes: - Wrapped c = get_config() in try-except to handle module import context - Defined DOCKER_SPAWNER_VOLUMES as module-level constant - Modified get_user_volume_suffixes() to accept volumes dict parameter - USER_VOLUME_SUFFIXES calculated from constant (importable without c defined) - Protected all c.* configuration assignments with 'if c is not None:' guards This allows custom_handlers.py to import USER_VOLUME_SUFFIXES without triggering "NameError: name 'get_config' is not defined" when the config file is imported as a module rather than loaded by JupyterHub. Volume management now works correctly - configuration can be safely imported by handlers to validate volume names against USER_VOLUME_SUFFIXES.