don't accept bytes in FileIO.write #7785

This commit is contained in:
Benjamin Peterson 2010-01-27 01:47:14 +00:00
parent d8aef76f6e
commit 255058fae3
3 changed files with 7 additions and 2 deletions

View file

@ -648,7 +648,7 @@ fileio_write(fileio *self, PyObject *args)
if (!self->writable)
return err_mode("writing");
if (!PyArg_ParseTuple(args, "s*", &pbuf))
if (!PyArg_ParseTuple(args, "y*", &pbuf))
return NULL;
if (_PyVerify_fd(self->fd)) {