Skip to content

Commit

Permalink
add back logic that was accidently removed in new package name
Browse files Browse the repository at this point in the history
  • Loading branch information
Zsailer committed Feb 10, 2022
1 parent c517811 commit 6b3ee7d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions notebook_shim/nbserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,21 @@ def sorted_extensions(self):
config_dirs = jupyter_paths + [serverapp.config_dir]
nbserver_extensions = get_nbserver_extensions(config_dirs)

# Link all extensions found in the old locations for
# notebook server extensions.
for name, enabled in nbserver_extensions.items():
# If the extension is already enabled in the manager, i.e.
# because it was discovered already by Jupyter Server
# through its jupyter_server_config, then don't re-enable here.
if name not in manager.extensions:
successful = manager.add_extension(name, enabled=enabled)
if successful:
logger.info(
"{name} | extension was found and enabled by notebook_shim. "
"Consider moving the extension to Jupyter Server's "
"extension paths.".format(name=name)
)
manager.link_extension(name)

def _load_jupyter_server_extension(serverapp):
# Patch the config service manager to find the
Expand Down

0 comments on commit 6b3ee7d

Please sign in to comment.