diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-05-09 19:24:36 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-05-09 19:24:36 (GMT) |
commit | e18df23d5d76e931f5163872bbdf7943f6ef7c5b (patch) | |
tree | 8efbe3d899687f496c01959fd98fb9c68dd16d33 /Objects | |
parent | 3131bb107d77ec5a0d4144e482757c9181b8d120 (diff) | |
download | cpython-e18df23d5d76e931f5163872bbdf7943f6ef7c5b.zip cpython-e18df23d5d76e931f5163872bbdf7943f6ef7c5b.tar.gz cpython-e18df23d5d76e931f5163872bbdf7943f6ef7c5b.tar.bz2 |
Merged revisions 72518 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72518 | benjamin.peterson | 2009-05-09 14:18:36 -0500 (Sat, 09 May 2009) | 1 line
clear error state properly
........
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/abstract.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index 83f5367..52c9025 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -98,6 +98,7 @@ _PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue) if (ro == NULL) { if (!PyErr_ExceptionMatches(PyExc_TypeError)) return -1; + PyErr_Clear(); return defaultvalue; } rv = PyLong_Check(ro) ? PyLong_AsSsize_t(ro) : defaultvalue; |