Skip to content

Commit 2cc9672

Browse files
authored
Ignore pageconfig file if JSON is zero-length (#444)
* Ignore pageconfig file if JSON is invalid * Check for optional logger before using it * Ignore pageconfig only if it is zero length
1 parent 8d036f5 commit 2cc9672

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jupyterlab_server/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def get_page_config(
126126
pjoin(app_settings_dir, "page_config.json"),
127127
]
128128
for path in config_paths:
129-
if osp.exists(path):
129+
if osp.exists(path) and osp.getsize(path):
130130
data = load_config(path)
131131
# Convert lists to dicts
132132
for key in [disabled_key, "deferredExtensions"]:

0 commit comments

Comments
 (0)