diff options
author | adustman <adustman@9fc6cd9a-920d-0410-adcf-ac96716ed7e8> | 2012-09-08 18:16:28 +0000 |
---|---|---|
committer | adustman <adustman@9fc6cd9a-920d-0410-adcf-ac96716ed7e8> | 2012-09-08 18:16:28 +0000 |
commit | a5c7996f601a2cd99eae77f88d5f7cf077066476 (patch) | |
tree | ba5f4315ba65530d9768062e82c59e74fd5cc3ce /MySQLdb | |
parent | 3b3e11340ac971f5f88515fe3c8301dc1ea51241 (diff) | |
download | mysqldb1-a5c7996f601a2cd99eae77f88d5f7cf077066476.tar.gz |
Fix import _mysql SystemError so that now we get the ImportError...
Diffstat (limited to 'MySQLdb')
-rw-r--r-- | MySQLdb/_mysql.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/MySQLdb/_mysql.c b/MySQLdb/_mysql.c index 9f7650a..8c1da47 100644 --- a/MySQLdb/_mysql.c +++ b/MySQLdb/_mysql.c @@ -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 |