mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Make sure that test_capsule always returns NULL on error; this may
help diagnose the sporadic test_capi failures on Solaris.
This commit is contained in:
parent
05516130fb
commit
6d138f1f45
1 changed files with 15 additions and 0 deletions
|
@ -1298,6 +1298,21 @@ test_capsule(PyObject *self, PyObject *args)
|
|||
if (error) {
|
||||
return raiseTestError("test_capsule", error);
|
||||
}
|
||||
/* 13/12/2009: something is causing test_capi to fail occasionally on
|
||||
the Solaris buildbot, with the output:
|
||||
|
||||
internal test_L_code
|
||||
internal test_Z_code
|
||||
internal test_bug_7414
|
||||
internal test_capsule
|
||||
XXX undetected error
|
||||
internaltest test_capi crashed -- <class 'ImportError'>: No module named datetime
|
||||
|
||||
It seems possible that test_capsule is raising an exception but
|
||||
failing to return NULL. Do a PyErr_Occurred check to find out.
|
||||
*/
|
||||
if (PyErr_Occurred())
|
||||
return NULL;
|
||||
Py_RETURN_NONE;
|
||||
#undef FAIL
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue