summaryrefslogtreecommitdiff
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-05-09 19:30:46 +0000
committerBenjamin Peterson <benjamin@python.org>2009-05-09 19:30:46 +0000
commit23b700aaeaaf9ef7b12df690823416e7f9c8a2d5 (patch)
tree1225726ca2b87e5ff91ae13e5eb88764c0e796d6 /Objects/abstract.c
parenta64fe199ed669392e2db1aec38035dd33914f3f3 (diff)
downloadcpython-23b700aaeaaf9ef7b12df690823416e7f9c8a2d5.tar.gz
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 52c90259e8..cc125f5fa4 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();
}