This commit is contained in:
@@ -399,9 +399,13 @@ def page_to_dict(page: ContentPage) -> dict[str, Any]:
|
||||
|
||||
def server_diagnostics() -> dict[str, Any]:
|
||||
pages = list_pages()
|
||||
try:
|
||||
cwd = Path.cwd().as_posix()
|
||||
except OSError as exc:
|
||||
cwd = f"<unavailable: {exc}>"
|
||||
return {
|
||||
"root": ROOT.as_posix(),
|
||||
"cwd": Path.cwd().as_posix(),
|
||||
"cwd": cwd,
|
||||
"executable": sys.executable,
|
||||
"pid": os.getpid(),
|
||||
"pageCount": len(pages),
|
||||
|
||||
Reference in New Issue
Block a user