Skip to content

Commit

Permalink
Use app.config_file_path to find server extensions
Browse files Browse the repository at this point in the history
This property in the base class already has the same logic to add config_dir to jupyter_config_path

JupyterHub overrides this to have slightly different logic, and the same should apply here
  • Loading branch information
minrk committed Mar 10, 2022
1 parent 426a4c6 commit c19aad8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions jupyter_server/serverapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
base_flags,
base_aliases,
)
from jupyter_core.paths import jupyter_config_path
from jupyter_client import KernelManager
from jupyter_client.kernelspec import KernelSpecManager
from jupyter_client.session import Session
Expand Down Expand Up @@ -2154,11 +2153,7 @@ def find_server_extensions(self):
# This enables merging on keys, which we want for extension enabling.
# Regular config loading only merges at the class level,
# so each level clobbers the previous.
config_paths = jupyter_config_path()
if self.config_dir not in config_paths:
# add self.config_dir to the front, if set manually
config_paths.insert(0, self.config_dir)
manager = ExtensionConfigManager(read_config_path=config_paths)
manager = ExtensionConfigManager(read_config_path=self.config_file_paths)
extensions = manager.get_jpserver_extensions()

for modulename, enabled in sorted(extensions.items()):
Expand Down

0 comments on commit c19aad8

Please sign in to comment.