devtools/testlib.py
branchstable
changeset 5778 1a4ac9e2ce63
parent 5751 1e5ef464cade
child 5783 c5ff8cd74758
--- a/devtools/testlib.py	Thu Jun 17 16:17:09 2010 +0200
+++ b/devtools/testlib.py	Thu Jun 17 16:24:01 2010 +0200
@@ -218,7 +218,10 @@
         if not 'repo' in cls.__dict__:
             cls._build_repo()
         else:
-            cls.cnx.rollback()
+            try:
+                cls.cnx.rollback()
+            except:
+                pass
             cls._refresh_repo()
 
     @classmethod
@@ -280,6 +283,7 @@
         MAILBOX[:] = [] # reset mailbox
 
     def tearDown(self):
+        self.cnx.rollback()
         for cnx in self._cnxs:
             if not cnx._closed:
                 cnx.close()