Fix exception handling in connect() (broken by 0.9.1.c1)

This commit is contained in:
adustman
2001-09-13 12:53:07 +00:00
parent 19527b3c95
commit 73f7dcf29f

View File

@ -261,7 +261,7 @@ _mysql_connect(
return NULL;
}
c->open = 0;
c->open = 1;
Py_BEGIN_ALLOW_THREADS ;
conn = mysql_init(&(c->connection));
if (connect_timeout) {
@ -287,10 +287,10 @@ _mysql_connect(
if (!conn) {
_mysql_Exception(c);
c->open = 0;
Py_DECREF(c);
return NULL;
}
c->open = 1;
return (PyObject *) c;
}