devtools/testlib.py
branchstable
changeset 5783 c5ff8cd74758
parent 5778 1a4ac9e2ce63
child 5785 c0661b963ced
--- a/devtools/testlib.py	Thu Jun 17 18:36:16 2010 +0200
+++ b/devtools/testlib.py	Thu Jun 17 18:50:20 2010 +0200
@@ -220,7 +220,7 @@
         else:
             try:
                 cls.cnx.rollback()
-            except:
+            except ProgrammingError:
                 pass
             cls._refresh_repo()
 
@@ -283,7 +283,10 @@
         MAILBOX[:] = [] # reset mailbox
 
     def tearDown(self):
-        self.cnx.rollback()
+        try:
+            self.cnx.rollback()
+        except ProgrammingError:
+            pass
         for cnx in self._cnxs:
             if not cnx._closed:
                 cnx.close()