##// END OF EJS Templates
Backport PR #5657: use 'localhost' as default for the notebook server...
Thomas Kluyver -
Show More
@@ -86,7 +86,6 b' from IPython.kernel.zmq.kernelapp import ('
86 )
86 )
87 from IPython.nbformat.sign import NotebookNotary
87 from IPython.nbformat.sign import NotebookNotary
88 from IPython.utils.importstring import import_item
88 from IPython.utils.importstring import import_item
89 from IPython.utils.localinterfaces import localhost
90 from IPython.utils import submodule
89 from IPython.utils import submodule
91 from IPython.utils.traitlets import (
90 from IPython.utils.traitlets import (
92 Dict, Unicode, Integer, List, Bool, Bytes,
91 Dict, Unicode, Integer, List, Bool, Bytes,
@@ -343,11 +342,9 b' class NotebookApp(BaseIPythonApplication):'
343
342
344 # Network related information.
343 # Network related information.
345
344
346 ip = Unicode(config=True,
345 ip = Unicode('localhost', config=True,
347 help="The IP address the notebook server will listen on."
346 help="The IP address the notebook server will listen on."
348 )
347 )
349 def _ip_default(self):
350 return localhost()
351
348
352 def _ip_changed(self, name, old, new):
349 def _ip_changed(self, name, old, new):
353 if new == u'*': self.ip = u''
350 if new == u'*': self.ip = u''
@@ -658,7 +655,7 b' class NotebookApp(BaseIPythonApplication):'
658
655
659 @property
656 @property
660 def connection_url(self):
657 def connection_url(self):
661 ip = self.ip if self.ip else localhost()
658 ip = self.ip if self.ip else 'localhost'
662 return self._url(ip)
659 return self._url(ip)
663
660
664 def _url(self, ip):
661 def _url(self, ip):
General Comments 0
You need to be logged in to leave comments. Login now