mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-15 02:54:29 +08:00
Fix import _mysql SystemError so that now we get the ImportError...
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user