Skip to content

Commit

Permalink
Ignore pageconfig file if JSON is zero-length (#444)
Browse files Browse the repository at this point in the history
* Ignore pageconfig file if JSON is invalid

* Check for optional logger before using it

* Ignore pageconfig only if it is zero length
  • Loading branch information
holzman committed Apr 8, 2024
1 parent 8d036f5 commit 2cc9672
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jupyterlab_server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def get_page_config(
pjoin(app_settings_dir, "page_config.json"),
]
for path in config_paths:
if osp.exists(path):
if osp.exists(path) and osp.getsize(path):
data = load_config(path)
# Convert lists to dicts
for key in [disabled_key, "deferredExtensions"]:
Expand Down

0 comments on commit 2cc9672

Please sign in to comment.