]> granicus.if.org Git - python/commitdiff
pydoc: close the DocServer when done
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 3 Jan 2011 16:12:39 +0000 (16:12 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 3 Jan 2011 16:12:39 +0000 (16:12 +0000)
Lib/pydoc.py

index ea282f77acdd1e87cc224e28ae1849d482024f5b..1855cd1cf27cc52d0f19cc586e6f4f10d00d207d 100755 (executable)
@@ -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)