Skip to content

Commit

Permalink
Ignore zero-length page_config.json, restore previous behavior of cra…
Browse files Browse the repository at this point in the history
…shing for invalid JSON (#1405)
  • Loading branch information
holzman authored Mar 13, 2024
1 parent f26c1a0 commit 0adfb2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jupyter_server/config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def get(self, section_name: str, include_root: bool = True) -> dict[str, t.Any]:
)
data: dict[str, t.Any] = {}
for path in paths:
if os.path.isfile(path):
if os.path.isfile(path) and os.path.getsize(path):
with open(path, encoding="utf-8") as f:
try:
recursive_update(data, json.load(f))
Expand Down

0 comments on commit 0adfb2a

Please sign in to comment.