projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf1b1fd
)
Clearing out old patch queue. Patch #558547, make SocketServer more
author
Anthony Baxter
<anthonybaxter@gmail.com>
Thu, 2 Jan 2003 03:07:48 +0000
(
03:07
+0000)
committer
Anthony Baxter
<anthonybaxter@gmail.com>
Thu, 2 Jan 2003 03:07:48 +0000
(
03:07
+0000)
robust. This makes socketserver's close() method callable repeatedly
without error - similar to other file-like objects.
Lib/SocketServer.py
patch
|
blob
|
history
diff --git
a/Lib/SocketServer.py
b/Lib/SocketServer.py
index 4437581dca13f1b2024959c8064a6791cc2d30a0..270f4cd69d932b27dd702a1872889468509902da 100644
(file)
--- 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()