Last changes to .set_isolation_level().

This commit is contained in:
Federico Di Gregorio 2005-10-08 03:15:17 +00:00
parent 6e69ac665f
commit 8e453ce176
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,6 @@
2005-10-08 Federico Di Gregorio <fog@initd.org>
2005-10-08 Federico Di Gregorio <fog@initd.org>
* psycopg/connection_type.c: isolation level upper bound set to 2.
* lib/psycopg1.py: explicitly set isolation level to 2 on .connect()
to mimic psycopg 1 behaviour.

View File

@ -149,7 +149,7 @@ psyco_conn_set_isolation_level(connectionObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "i", &level)) return NULL;
if (level < 0 || level > 3) {
if (level < 0 || level > 2) {
PyErr_SetString(PyExc_ValueError,
"isolation level out of bounds (0,3)");
return NULL;