mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
don't accept bytes in FileIO.write #7785
This commit is contained in:
parent
d8aef76f6e
commit
255058fae3
3 changed files with 7 additions and 2 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue