summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-01-03 16:12:39 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-01-03 16:12:39 (GMT)
commita3abd1d2401c5c6d93518b01686db837ed5612c0 (patch)
treef5abcef3a856fe0ef6c2375590010f25c64bbacd /Lib
parent2b69506c7997881fa7bad2bfd334db747f8cb820 (diff)
downloadcpython-a3abd1d2401c5c6d93518b01686db837ed5612c0.zip
cpython-a3abd1d2401c5c6d93518b01686db837ed5612c0.tar.gz
cpython-a3abd1d2401c5c6d93518b01686db837ed5612c0.tar.bz2
pydoc: close the DocServer when done
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/pydoc.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index ea282f7..1855cd1 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -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)