Fix import _mysql SystemError so that now we get the ImportError...

This commit is contained in:
adustman
2012-09-08 18:16:28 +00:00
parent 3b3e11340a
commit a5c7996f60

View File

@ -3064,9 +3064,11 @@ init_mysql(void)
#endif
if (PyDict_SetItemString(dict, "NULL", _mysql_NULL)) goto error;
error:
if (PyErr_Occurred())
if (PyErr_Occurred()) {
PyErr_SetString(PyExc_ImportError,
"_mysql: init failed");
module = NULL;
}
#ifdef IS_PY3K
return module;
#endif