Commits

Jesús Cea committed 2d68248

Issue #9675: Final touch

Comments (0)

Files changed (1)

         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();
     }