summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAnthony Baxter <anthonybaxter@gmail.com>2003-01-02 03:07:48 (GMT)
committerAnthony Baxter <anthonybaxter@gmail.com>2003-01-02 03:07:48 (GMT)
commit4cedc1e84ee174cebaa59295690cfd5c6f10a0b7 (patch)
tree99384ba3e2507fc17508ab0dec0df6599e9ec10e /Lib
parentbf1b1fdb9e01d01d18dd791c6a8ebc74cb6b0f47 (diff)
downloadcpython-4cedc1e84ee174cebaa59295690cfd5c6f10a0b7.zip
cpython-4cedc1e84ee174cebaa59295690cfd5c6f10a0b7.tar.gz
cpython-4cedc1e84ee174cebaa59295690cfd5c6f10a0b7.tar.bz2
Clearing out old patch queue. Patch #558547, make SocketServer more
robust. This makes socketserver's close() method callable repeatedly without error - similar to other file-like objects.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/SocketServer.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/SocketServer.py b/Lib/SocketServer.py
index 4437581..270f4cd 100644
--- a/Lib/SocketServer.py
+++ b/Lib/SocketServer.py
@@ -561,7 +561,8 @@ class StreamRequestHandler(BaseRequestHandler):
self.wfile = self.connection.makefile('wb', self.wbufsize)
def finish(self):
- self.wfile.flush()
+ if not self.wfile.closed:
+ self.wfile.flush()
self.wfile.close()
self.rfile.close()