Skip to content

Commit

Permalink
Backport PR #5657: use 'localhost' as default for the notebook server
Browse files Browse the repository at this point in the history
instead of loopback IP

seems to workaround weird issues with Sophos on Windows, and should behave the same everywhere else.
  • Loading branch information
takluyver committed May 7, 2014
1 parent 09b673f commit 00f2e39
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions IPython/html/notebookapp.py
Expand Up @@ -86,7 +86,6 @@
)
from IPython.nbformat.sign import NotebookNotary
from IPython.utils.importstring import import_item
from IPython.utils.localinterfaces import localhost
from IPython.utils import submodule
from IPython.utils.traitlets import (
Dict, Unicode, Integer, List, Bool, Bytes,
Expand Down Expand Up @@ -343,11 +342,9 @@ def _file_to_run_changed(self, name, old, new):

# Network related information.

ip = Unicode(config=True,
ip = Unicode('localhost', config=True,
help="The IP address the notebook server will listen on."
)
def _ip_default(self):
return localhost()

def _ip_changed(self, name, old, new):
if new == u'*': self.ip = u''
Expand Down Expand Up @@ -658,7 +655,7 @@ def display_url(self):

@property
def connection_url(self):
ip = self.ip if self.ip else localhost()
ip = self.ip if self.ip else 'localhost'
return self._url(ip)

def _url(self, ip):
Expand Down

0 comments on commit 00f2e39

Please sign in to comment.