Commit b0ba27df authored by Benjamin Peterson's avatar Benjamin Peterson

only need to catch an TypeError here

parent e18df23d
......@@ -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();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment