Be a bit more explicit

This commit is contained in:
Jan Urbański 2010-03-31 02:00:27 +02:00 committed by Federico Di Gregorio
parent 58eb868db6
commit 31f60be000

View File

@ -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;