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) ...@@ -83,9 +83,8 @@ _PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue)
if (rv >= 0) if (rv >= 0)
return rv; return rv;
if (PyErr_Occurred()) { if (PyErr_Occurred()) {
if (!PyErr_ExceptionMatches(PyExc_TypeError) && if (!PyErr_ExceptionMatches(PyExc_TypeError))
!PyErr_ExceptionMatches(PyExc_AttributeError)) return -1;
return -1;
PyErr_Clear(); 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