From: Mark Dickinson Date: Sat, 13 Feb 2010 18:34:53 +0000 (+0000) Subject: Issue #7924: Fix an intermittent 'XXX undetected error' crash in X-Git-Tag: v3.2a1~1697 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=edff7af1cf5745ae142a6ad2c25f158ef705aeb0;p=thirdparty%2FPython%2Fcpython.git Issue #7924: Fix an intermittent 'XXX undetected error' crash in test_capi, due to test_capsule failing to clear an exception. Many thanks to Florent Xicluna for the diagnosis and fix. --- diff --git a/Misc/NEWS b/Misc/NEWS index 762def27c58e..f911bd4fc0c7 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -738,6 +738,10 @@ Documentation Tests ----- +- Issue #7924: Fix an intermittent 'XXX undetected error' failure in + test_capi (only seen so far on platforms where the curses module + wasn't built), due to an uncleared exception. + - issue #7728: test_timeout was changed to use test_support.bind_port instead of a hard coded port. diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index f9f6fca87331..5631d5a037ea 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -1763,6 +1763,8 @@ test_capsule(PyObject *self, PyObject *args) Py_DECREF(object); Py_DECREF(module); } + else + PyErr_Clear(); } exit: