diff --git a/psycopg/cursor_type.c b/psycopg/cursor_type.c index bcbefc5f..6289f671 100644 --- a/psycopg/cursor_type.c +++ b/psycopg/cursor_type.c @@ -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;