From bf088f811cdab3485228ae0d43e24f9b07bbe6a2 Mon Sep 17 00:00:00 2001 From: Jesus Cea Date: Mon, 8 Nov 2010 12:57:59 +0000 Subject: [PATCH] Issue #9675: Final touch --- Modules/_bsddb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c index 14517764e5e..d2d12ffb48f 100644 --- a/Modules/_bsddb.c +++ b/Modules/_bsddb.c @@ -9987,8 +9987,10 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ Py_DECREF(py_api); } else { /* Something bad happened */ PyErr_WriteUnraisable(m); - PyErr_Warn(PyExc_RuntimeWarning, - "_bsddb/_pybsddb C API will be not available"); + if(PyErr_Warn(PyExc_RuntimeWarning, + "_bsddb/_pybsddb C API will be not available")) { + PyErr_WriteUnraisable(m); + } PyErr_Clear(); }