Source

CherryPy / cherrypy / _cpserver.py

Diff from to

File cherrypy/_cpserver.py

         
         host = self.socket_host
         port = self.socket_port
-        if not host:
-            host = 'localhost'
         return httpserver, (host, port)
     
     def start(self):
 def check_port(host, port):
     """Raise an error if the given port is not free on the given host."""
     if not host:
+        # The empty string signifies INADDR_ANY,
+        # which should respond on localhost.
         host = 'localhost'
     port = int(port)
     
 def wait_for_free_port(host, port):
     """Wait for the specified port to become free (drop requests)."""
     if not host:
+        # The empty string signifies INADDR_ANY,
+        # which should respond on localhost.
         host = 'localhost'
     
     for trial in xrange(50):
 def wait_for_occupied_port(host, port):
     """Wait for the specified port to become active (receive requests)."""
     if not host:
+        # The empty string signifies INADDR_ANY,
+        # which should respond on localhost.
         host = 'localhost'
     
     for trial in xrange(50):