From bb792d37e71f8fb701ec1afa9b3234723a830b77 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Mon, 16 Oct 2006 21:56:11 +0000 Subject: [PATCH] - ignore rollback errors --- PLC/PostgreSQL.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/PLC/PostgreSQL.py b/PLC/PostgreSQL.py index 5ca0caa9..069d944f 100644 --- a/PLC/PostgreSQL.py +++ b/PLC/PostgreSQL.py @@ -5,7 +5,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: PostgreSQL.py,v 1.3 2006/10/03 19:27:07 mlhuang Exp $ +# $Id: PostgreSQL.py,v 1.4 2006/10/13 20:00:37 mlhuang Exp $ # import pgdb @@ -100,8 +100,10 @@ class PostgreSQL: (self.rowcount, self.description, self.lastrowid) = \ (cursor.rowcount, cursor.description, cursor.lastrowid) except pgdb.DatabaseError, e: - cursor.close() - self.rollback() + try: + self.rollback() + except: + pass uuid = commands.getoutput("uuidgen") print >> log, "Database error %s:" % uuid print >> log, e -- 2.47.0