Fixed bad error return code from cursor's init

This commit is contained in:
Daniele Varrazzo 2012-04-11 17:26:11 +01:00
parent 037b704e9a
commit c63891af8d

View File

@ -1724,7 +1724,7 @@ cursor_setup(cursorObject *self, connectionObject *conn, const char *name)
if (name) {
if (!(self->name = psycopg_escape_identifier_easy(name, 0))) {
return 1;
return -1;
}
}
@ -1733,7 +1733,7 @@ cursor_setup(cursorObject *self, connectionObject *conn, const char *name)
(PyObject *)&connectionType) == 0) {
PyErr_SetString(PyExc_TypeError,
"argument 1 must be subclass of psycopg2._psycopg.connection");
return 1;
return -1;
} */
Py_INCREF(conn);
self->conn = conn;