Skip to content

Commit 0adfb2a

Browse files
authored
Ignore zero-length page_config.json, restore previous behavior of crashing for invalid JSON (#1405)
1 parent f26c1a0 commit 0adfb2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jupyter_server/config_manager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def get(self, section_name: str, include_root: bool = True) -> dict[str, t.Any]:
101101
)
102102
data: dict[str, t.Any] = {}
103103
for path in paths:
104-
if os.path.isfile(path):
104+
if os.path.isfile(path) and os.path.getsize(path):
105105
with open(path, encoding="utf-8") as f:
106106
try:
107107
recursive_update(data, json.load(f))

0 commit comments

Comments
 (0)