]> granicus.if.org Git - python/commitdiff
Issue #9675: Final touch
authorJesus Cea <jcea@jcea.es>
Mon, 8 Nov 2010 12:57:59 +0000 (12:57 +0000)
committerJesus Cea <jcea@jcea.es>
Mon, 8 Nov 2010 12:57:59 +0000 (12:57 +0000)
Modules/_bsddb.c

index 14517764e5ef90c575c4c40a582e37910280dec8..d2d12ffb48f7b9474883ccad8ea156929def0e46 100644 (file)
@@ -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();
     }