Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5ebca87

Browse files
committed
Allow makefile('rb') or 'wb'.
1 parent c743c8d commit 5ebca87

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Mac/Unsupported/mactcp/socket.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ def __init__(self):
216216
class _socketfile:
217217

218218
def __init__(self, sock, rw, bs):
219+
if rw[1:] == 'b': rw = rw[:1]
219220
if rw not in ('r', 'w'): raise _myerror, "mode must be 'r' or 'w'"
220221
self.sock = sock
221222
self.rw = rw

0 commit comments

Comments
 (0)