equal
deleted
inserted
replaced
715 try: |
715 try: |
716 cnx.cnxset.rollback() |
716 cnx.cnxset.rollback() |
717 query_debug_informations["rollback"] = True |
717 query_debug_informations["rollback"] = True |
718 if self.repo.config.mode != 'test': |
718 if self.repo.config.mode != 'test': |
719 self.debug('transaction has been rolled back') |
719 self.debug('transaction has been rolled back') |
720 except Exception: |
720 except Exception as rollback_exc: |
721 pass |
721 self.warning('exception raised and ignored during rollback %s:\n%s', |
|
722 rollback_exc, traceback.format_exc(limit=2)) |
722 if any(cls.__name__ for cls in ex.__class__.__mro__ |
723 if any(cls.__name__ for cls in ex.__class__.__mro__ |
723 if cls.__name__ == 'IntegrityError'): |
724 if cls.__name__ == 'IntegrityError'): |
724 # need string comparison because of various backends |
725 # need string comparison because of various backends |
725 for arg in ex.args: |
726 for arg in ex.args: |
726 # postgres, sqlserver |
727 # postgres, sqlserver |