pydoc: close the DocServer when done

This commit is contained in:
Victor Stinner 2011-01-03 16:12:39 +00:00
parent 2b69506c79
commit a3abd1d240
1 changed files with 2 additions and 0 deletions

View File

@ -2112,6 +2112,7 @@ pydoc</strong> by Ka-Ping Yee &lt;ping@lfw.org&gt;</font>'''
while not self.quit:
rd, wr, ex = select.select([self.socket.fileno()], [], [], 1)
if rd: self.handle_request()
self.server_close()
def server_activate(self):
self.base.server_activate(self)
@ -2409,6 +2410,7 @@ def _start_server(urlhandler, port):
rd, wr, ex = select.select([self.socket.fileno()], [], [], 1)
if rd:
self.handle_request()
self.server_close()
def server_activate(self):
self.base.server_activate(self)