summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-05-09 19:30:46 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-05-09 19:30:46 (GMT)
commitb0ba27dff1442fe6dc7b00ce7d8488afb159d9b8 (patch)
tree2bda11c05ed21e3f23d91c6598be5b1f5fb43109 /Objects/abstract.c
parente18df23d5d76e931f5163872bbdf7943f6ef7c5b (diff)
downloadcpython-b0ba27dff1442fe6dc7b00ce7d8488afb159d9b8.zip
cpython-b0ba27dff1442fe6dc7b00ce7d8488afb159d9b8.tar.gz
cpython-b0ba27dff1442fe6dc7b00ce7d8488afb159d9b8.tar.bz2
only need to catch an TypeError here
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c5
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();
}