Skip to content

Commit

Permalink
Avoid shadowing variable name + check before conversion
Browse files Browse the repository at this point in the history
If the docs are to be believed, the settings are meant to have disabled extensions as dicts: https://jupyterlab.readthedocs.io/en/stable/user/directories.html#labconfig-directories

This prevents disabling an extension if the value is `false`.
  • Loading branch information
vidartf committed Jul 21, 2021
1 parent 93b4d7c commit 3538b5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jupyterlab_server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def get_page_config(labextensions_path, app_settings_dir=None, logger=None):

# Convert lists to dicts
for key in [disabled_key, "deferredExtensions"]:
if key in data:
data[key] = dict((key, True) for key in data[key])
if key in data and not isinstance(data[key], dict):
data[key] = dict((k, True) for k in data[key])

recursive_update(page_config, data)

Expand Down

0 comments on commit 3538b5e

Please sign in to comment.