# HG changeset patch # User Aurelien Campeas # Date 1276793420 -7200 # Node ID c5ff8cd747581b87011e16a6f3481bbf6ff2f6c1 # Parent 8ff48d1a319f5ddea8695406645115a607e687b7 [devtools/teslib] be more defensive on rollbacks diff -r 8ff48d1a319f -r c5ff8cd74758 devtools/testlib.py --- 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()