Allow makefile('rb') or 'wb'.

This commit is contained in:
Jack Jansen 1996-02-14 16:03:14 +00:00
parent c743c8d166
commit 5ebca871d9
1 changed files with 1 additions and 0 deletions

View File

@ -216,6 +216,7 @@ class _udpsocket(_socket):
class _socketfile:
def __init__(self, sock, rw, bs):
if rw[1:] == 'b': rw = rw[:1]
if rw not in ('r', 'w'): raise _myerror, "mode must be 'r' or 'w'"
self.sock = sock
self.rw = rw