From 63698c6c28a4b06e0da73ecb2a0f70ae2d251c17 Mon Sep 17 00:00:00 2001 From: Federico Di Gregorio Date: Thu, 19 May 2005 01:18:21 +0000 Subject: [PATCH] Little cursor fix. --- ChangeLog | 6 ++++++ psycopg/cursor_type.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bdd17a59..35127a8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-05-19 Federico Di Gregorio + + * psycopg/cursor_type.c (_psyco_curs_execute): added explict check + to avoid using None as bound variables (very importand for cursor + subclasses calling cursor.execute(self, query, None). + 2005-05-18 Federico Di Gregorio * Release 2.0b2. diff --git a/psycopg/cursor_type.c b/psycopg/cursor_type.c index 83466d0e..4b3de5b0 100644 --- a/psycopg/cursor_type.c +++ b/psycopg/cursor_type.c @@ -286,7 +286,7 @@ _psyco_curs_execute(cursorObject *self, let's go... */ - if (vars) + if (vars && vars != Py_None) { if(_mogrify(vars, operation, self->conn, &cvt) == -1) { Py_XDECREF(uoperation);