File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2168,8 +2168,8 @@ def log_message(self, *args):
21682168 class DocServer (http .server .HTTPServer ):
21692169
21702170 def __init__ (self , port , callback ):
2171- self .host = ( sys . platform == 'mac' ) and '127.0.0.1' or 'localhost'
2172- self .address = ('' , port )
2171+ self .host = 'localhost'
2172+ self .address = (self . host , port )
21732173 self .callback = callback
21742174 self .base .__init__ (self , self .address , self .handler )
21752175 self .quit = False
Original file line number Diff line number Diff line change @@ -557,6 +557,8 @@ def my_url_handler(url, content_type):
557557 return text
558558
559559 serverthread = pydoc ._start_server (my_url_handler , port = 0 )
560+ self .assertIn ('localhost' , serverthread .docserver .address )
561+
560562 starttime = time .time ()
561563 timeout = 1 #seconds
562564
You can’t perform that action at this time.
0 commit comments