commit | 197e8321c659d8dd22851363bbcebd98092ed2c9 | [log] [tgz] |
---|---|---|
author | Walter Dörwald <walter@livinglogic.de> | Wed Mar 15 22:13:13 2006 +0000 |
committer | Walter Dörwald <walter@livinglogic.de> | Wed Mar 15 22:13:13 2006 +0000 |
tree | 77f10a6ecfb500e5940c3ea011f628bd7cf9b7cd | |
parent | 9998f78d6dc78e1e2652f07423e25353a32413a3 [diff] [blame] |
SF patch #1359365: cStringIO.StringIO.isatty() will raise a ValueError now if close() has been called before (like file and StringIO.StringIO do)
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 @@ 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; }