diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-05-09 19:30:46 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-05-09 19:30:46 (GMT) |
commit | b0ba27dff1442fe6dc7b00ce7d8488afb159d9b8 (patch) | |
tree | 2bda11c05ed21e3f23d91c6598be5b1f5fb43109 /Objects/abstract.c | |
parent | e18df23d5d76e931f5163872bbdf7943f6ef7c5b (diff) | |
download | cpython-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.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(); } |