mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
allow more operations to work on detached streams (closes #23093)
Patch by Martin Panter.
This commit is contained in:
parent
fe3dc376fa
commit
10e76b67c9
5 changed files with 61 additions and 42 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue