allow more operations to work on detached streams (closes #23093)

Patch by Martin Panter.
This commit is contained in:
Benjamin Peterson 2014-12-21 20:51:50 -06:00
parent fe3dc376fa
commit 10e76b67c9
5 changed files with 61 additions and 42 deletions

View file

@ -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;