Skip to content

Commit fa41b38

Browse files
authored
display_url: Don't duplicate public_url and local_url if they are the same (#1494)
1 parent e12feb9 commit fa41b38

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jupyter_server/serverapp.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2386,7 +2386,9 @@ def display_url(self) -> str:
23862386
"""Human readable string with URLs for interacting
23872387
with the running Jupyter Server
23882388
"""
2389-
url = self.public_url + "\n " + self.local_url
2389+
url = self.public_url
2390+
if self.public_url != self.local_url:
2391+
url = f"{url}\n {self.local_url}"
23902392
return url
23912393

23922394
@property

0 commit comments

Comments
 (0)