summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-06-05 12:15:35 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-06-05 12:15:35 (GMT)
commitb671c2933689c86a1428917d0e090d1253350f52 (patch)
treee57a960d566daa9309eaa9dca90d292fb9285dae /Objects
parent80068da395457a496af5db713c586a09f75836f9 (diff)
downloadcpython-b671c2933689c86a1428917d0e090d1253350f52.zip
cpython-b671c2933689c86a1428917d0e090d1253350f52.tar.gz
cpython-b671c2933689c86a1428917d0e090d1253350f52.tar.bz2
Merged revisions 81740 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r81740 | mark.dickinson | 2010-06-05 13:14:43 +0100 (Sat, 05 Jun 2010) | 5 lines Issue #8627: Fix "XXX undetected error" from unchecked PyErr_WarnPy3k return. This is just a quick fix: if the warning is turned into an exception, the exception simply gets ignored. ........
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index af2dc0b..f496804 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3853,10 +3853,16 @@ inherit_slots(PyTypeObject *type, PyTypeObject *base)
(base->tp_hash != PyObject_HashNotImplemented) &&
!OVERRIDES_HASH(type)) {
if (OVERRIDES_EQ(type)) {
- PyErr_WarnPy3k("Overriding "
- "__eq__ blocks inheritance "
- "of __hash__ in 3.x",
- 1);
+ if (PyErr_WarnPy3k("Overriding "
+ "__eq__ blocks inheritance "
+ "of __hash__ in 3.x",
+ 1) < 0)
+ /* XXX This isn't right. If the warning is turned
+ into an exception, we should be communicating
+ the error back to the caller, but figuring out
+ how to clean-up in that case is tricky. See
+ issue 8627 for more. */
+ PyErr_Clear();
}
}
}