diff options
-rw-r--r-- | Objects/abstract.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index 52c9025..cc125f5 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -83,9 +83,8 @@ _PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue) if (rv >= 0) return rv; if (PyErr_Occurred()) { - if (!PyErr_ExceptionMatches(PyExc_TypeError) && - !PyErr_ExceptionMatches(PyExc_AttributeError)) - return -1; + if (!PyErr_ExceptionMatches(PyExc_TypeError)) + return -1; PyErr_Clear(); } |