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

@ -10,7 +10,7 @@ try:
fd = int(sys.argv[2])
try:
os.write(fd, "blat")
os.write(fd, b"blat")
except os.error:
# Success -- could not write to fd.
sys.exit(0)