summaryrefslogtreecommitdiffstats
path: root/Modules/cStringIO.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/cStringIO.c')
-rw-r--r--Modules/cStringIO.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/cStringIO.c b/Modules/cStringIO.c
index fd28aa9..bdc9f00 100644
--- a/Modules/cStringIO.c
+++ b/Modules/cStringIO.c
@@ -144,7 +144,8 @@ PyDoc_STRVAR(IO_isatty__doc__, "isatty(): always returns 0");
static PyObject *
IO_isatty(IOobject *self, PyObject *unused) {
- Py_INCREF(Py_False);
+ if (!IO__opencheck(self)) return NULL;
+ Py_INCREF(Py_False);
return Py_False;
}