File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2178,8 +2178,8 @@ def log_message(self, *args):
21782178 class DocServer (http .server .HTTPServer ):
21792179
21802180 def __init__ (self , port , callback ):
2181- self .host = ( sys . platform == 'mac' ) and '127.0.0.1' or 'localhost'
2182- self .address = ('' , port )
2181+ self .host = 'localhost'
2182+ self .address = (self . host , port )
21832183 self .callback = callback
21842184 self .base .__init__ (self , self .address , self .handler )
21852185 self .quit = False
Original file line number Diff line number Diff line change @@ -803,6 +803,8 @@ def my_url_handler(url, content_type):
803803 return text
804804
805805 serverthread = pydoc ._start_server (my_url_handler , port = 0 )
806+ self .assertIn ('localhost' , serverthread .docserver .address )
807+
806808 starttime = time .time ()
807809 timeout = 1 #seconds
808810
You can’t perform that action at this time.
0 commit comments