summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-12-13 20:03:21 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-12-13 20:03:21 (GMT)
commit6d138f1f450aa1ef0f95b55c006244d7c65c3c48 (patch)
tree80d5d3bec7d00df92b0b917630417dd086e22e15 /Modules/_testcapimodule.c
parent05516130fb5d7128774ed519a8dfe7e1e78c4209 (diff)
downloadcpython-6d138f1f450aa1ef0f95b55c006244d7c65c3c48.zip
cpython-6d138f1f450aa1ef0f95b55c006244d7c65c3c48.tar.gz
cpython-6d138f1f450aa1ef0f95b55c006244d7c65c3c48.tar.bz2
Make sure that test_capsule always returns NULL on error; this may
help diagnose the sporadic test_capi failures on Solaris.
Diffstat (limited to 'Modules/_testcapimodule.c')
-rw-r--r--Modules/_testcapimodule.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index f41d4fe..aca860a 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -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
}