Skip to content

Commit

Permalink
Merge pull request #4103 from einon/einonm
Browse files Browse the repository at this point in the history
Fix copy/paste-ability of default URL presented on startup
  • Loading branch information
takluyver authored Nov 7, 2018
2 parents a036ba2 + f140ba9 commit 2af7440
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions notebook/notebookapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1438,14 +1438,16 @@ def display_url(self):
url += '/'
else:
if self.ip in ('', '0.0.0.0'):
ip = "(%s or 127.0.0.1)" % socket.gethostname()
ip = "%s" % socket.gethostname()
else:
ip = self.ip
url = self._url(ip)
if self.token:
# Don't log full token if it came from config
token = self.token if self._token_generated else '...'
url = url_concat(url, {'token': token})
url = (url_concat(url, {'token': token})
+ '\n or '
+ url_concat(self._url('127.0.0.1'), {'token': token}))
return url

@property
Expand Down

0 comments on commit 2af7440

Please sign in to comment.