diff --git a/ChangeLog b/ChangeLog index 88c883af..6588a987 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-09-01 Federico Di Gregorio + * Release 2.0.5. + + * Fixed patch from #119, see tracker for details. + * Preparing release 2.0.5. * psycopg/psycopgmodule.c: fixed filling of connection errors diff --git a/psycopg/adapter_binary.c b/psycopg/adapter_binary.c index 75cfa1c0..0fc8101e 100644 --- a/psycopg/adapter_binary.c +++ b/psycopg/adapter_binary.c @@ -149,14 +149,11 @@ binary_quote(binaryObject *self) return NULL; } - if (len > 0) { + if (len > 0) self->buffer = PyString_FromFormat("'%s'", to); - PQfreemem(to); - } - else { + else self->buffer = PyString_FromString("''"); - PQfreemem(to); - } + PQfreemem(to); } /* if the wrapped object is not a string or a buffer, this is an error */