summaryrefslogtreecommitdiff
path: root/py/stream.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-11-16 23:56:37 +0000
committerDamien George <damien.p.george@gmail.com>2014-11-16 23:56:37 +0000
commit5694cc5490235a9091fe3e2c5563471565e3da97 (patch)
tree3f867d354a06935acf32d47df1fd8fbaf1285168 /py/stream.c
parent91386eee2613cbaf736d746cfef28674cce82c01 (diff)
py: Make stream seek correctly check for ioctl fn; add seek for textio.
Diffstat (limited to 'py/stream.c')
-rw-r--r--py/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/stream.c b/py/stream.c
index 1361d6c72..810e9b349 100644
--- a/py/stream.c
+++ b/py/stream.c
@@ -382,7 +382,7 @@ mp_obj_t mp_stream_unbuffered_iter(mp_obj_t self) {
STATIC mp_obj_t stream_seek(mp_uint_t n_args, const mp_obj_t *args) {
struct _mp_obj_base_t *o = (struct _mp_obj_base_t *)args[0];
- if (o->type->stream_p == NULL || o->type->stream_p->read == NULL) {
+ if (o->type->stream_p == NULL || o->type->stream_p->ioctl == NULL) {
// CPython: io.UnsupportedOperation, OSError subclass
nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Operation not supported"));
}