Issue #3782: os.write() must not accept unicode strings

This commit is contained in:
Antoine Pitrou 2008-09-15 23:02:56 +00:00
parent 4e80cdd739
commit 9cadb1b6e0
9 changed files with 50 additions and 24 deletions

View file

@ -129,7 +129,7 @@ def fork():
def _writen(fd, data):
"""Write all the data to a descriptor."""
while data != '':
while data:
n = os.write(fd, data)
data = data[n:]