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):
buf = buf[bytes:]
continue
return bytes
return len(data)
except socket.error, e:
if e[0] in (errno.EWOULDBLOCK, errno.EAGAIN):
break