mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-23 01:16:34 +03:00
Be a bit more explicit
This commit is contained in:
parent
58eb868db6
commit
31f60be000
|
@ -74,8 +74,8 @@ psyco_conn_cursor(connectionObject *self, PyObject *args, PyObject *keywds)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (name != NULL && self->async) {
|
||||
PyErr_SetString(OperationalError,
|
||||
if (name != NULL && self->async == 1) {
|
||||
PyErr_SetString(ProgrammingError,
|
||||
"asynchronous connections "
|
||||
"cannot produce named cursors");
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue
Block a user