commit | 255058fae340f354df12bb27533aa66b7f82d30f | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Wed Jan 27 01:47:14 2010 +0000 |
committer | Benjamin Peterson <benjamin@python.org> | Wed Jan 27 01:47:14 2010 +0000 |
tree | 6a6c08a244282c55586d77f6a4dbc51e14b675a6 | |
parent | d8aef76f6e843368b05d424ad1cc64299288cbb5 [diff] [blame] |
don't accept bytes in FileIO.write #7785
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c index 37ddaeb..f02fe8a 100644 --- a/Modules/_io/fileio.c +++ b/Modules/_io/fileio.c
@@ -648,7 +648,7 @@ 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)) {