summaryrefslogtreecommitdiffstats
path: root/Modules/_io/bufferedio.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-12-22 02:51:50 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-12-22 02:51:50 (GMT)
commit10e76b67c9bb2f6febeb7f264478532cbe985ecd (patch)
tree36cae1df94a9ed11666054c854ba45c754ac0133 /Modules/_io/bufferedio.c
parentfe3dc376fa73fce563be26417ea763b05115990b (diff)
downloadcpython-10e76b67c9bb2f6febeb7f264478532cbe985ecd.zip
cpython-10e76b67c9bb2f6febeb7f264478532cbe985ecd.tar.gz
cpython-10e76b67c9bb2f6febeb7f264478532cbe985ecd.tar.bz2
allow more operations to work on detached streams (closes #23093)
Patch by Martin Panter.
Diffstat (limited to 'Modules/_io/bufferedio.c')
-rw-r--r--Modules/_io/bufferedio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c
index 8084aae..02cf038 100644
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -1359,7 +1359,7 @@ buffered_repr(buffered *self)
nameobj = _PyObject_GetAttrId((PyObject *) self, &PyId_name);
if (nameobj == NULL) {
- if (PyErr_ExceptionMatches(PyExc_AttributeError))
+ if (PyErr_ExceptionMatches(PyExc_Exception))
PyErr_Clear();
else
return NULL;