| commit | a7eaa41f7f54609847b3e0f22dff8400f874e796 | [log] [tgz] |
|---|---|---|
| author | Martin v. Löwis <martin@v.loewis.de> | Sun May 29 17:15:44 2011 +0200 |
| committer | Martin v. Löwis <martin@v.loewis.de> | Sun May 29 17:15:44 2011 +0200 |
| tree | b80aa7e386986b37e27e2d301511110d66a87595 | |
| parent | 987475c9568c12d411e74e301ccfd12f7be4f06a [diff] |
Use bytes in myreceive.
diff --git a/Doc/howto/sockets.rst b/Doc/howto/sockets.rst index 80e98f7..2416807 100644 --- a/Doc/howto/sockets.rst +++ b/Doc/howto/sockets.rst
@@ -208,10 +208,10 @@ totalsent = totalsent + sent def myreceive(self): - msg = '' + msg = b'' while len(msg) < MSGLEN: chunk = self.sock.recv(MSGLEN-len(msg)) - if chunk == '': + if chunk == b'': raise RuntimeError("socket connection broken") msg = msg + chunk return msg