From 2e55b35d5db7a4773be22909371ea285e0e09398 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sat, 5 Apr 2014 15:10:15 +0100 Subject: [PATCH] Don't set an exception witout GIL closing lobjects with a bad conn We ended up in this branch only for an excessively aggressive closing of the transaction that now I'm going to fix. --- psycopg/lobject_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psycopg/lobject_int.c b/psycopg/lobject_int.c index 2f78e90b..43f2b179 100644 --- a/psycopg/lobject_int.c +++ b/psycopg/lobject_int.c @@ -253,7 +253,7 @@ lobject_close_locked(lobjectObject *self, char **error) return 0; break; default: - PyErr_SetString(OperationalError, "the connection is broken"); + *error = strdup("the connection is broken"); return -1; break; }