diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-12-22 02:51:50 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-12-22 02:51:50 (GMT) |
commit | 10e76b67c9bb2f6febeb7f264478532cbe985ecd (patch) | |
tree | 36cae1df94a9ed11666054c854ba45c754ac0133 /Modules/_io/bufferedio.c | |
parent | fe3dc376fa73fce563be26417ea763b05115990b (diff) | |
download | cpython-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.c | 2 |
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; |