write should return length of data

This commit is contained in:
benoitc 2010-01-18 17:59:26 +01:00
parent 6714b30ddc
commit 522933416c

View File

@ -76,7 +76,7 @@ def write(sock, data):
if bytes < len(buf): if bytes < len(buf):
buf = buf[bytes:] buf = buf[bytes:]
continue continue
return bytes return len(data)
except socket.error, e: except socket.error, e:
if e[0] in (errno.EWOULDBLOCK, errno.EAGAIN): if e[0] in (errno.EWOULDBLOCK, errno.EAGAIN):
break break