mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-01-31 17:34:08 +03:00
Fixed bad error return code from cursor's init
This commit is contained in:
parent
037b704e9a
commit
c63891af8d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user