equal
deleted
inserted
replaced
688 cnx.cnxset.rollback() |
688 cnx.cnxset.rollback() |
689 if self.repo.config.mode != 'test': |
689 if self.repo.config.mode != 'test': |
690 self.debug('transaction has been rolled back') |
690 self.debug('transaction has been rolled back') |
691 except Exception: |
691 except Exception: |
692 pass |
692 pass |
693 if ex.__class__.__name__ == 'IntegrityError': |
693 if any(cls.__name__ for cls in ex.__class__.__mro__ |
|
694 if cls.__name__ == 'IntegrityError'): |
694 # need string comparison because of various backends |
695 # need string comparison because of various backends |
695 for arg in ex.args: |
696 for arg in ex.args: |
696 # postgres, sqlserver |
697 # postgres, sqlserver |
697 mo = re.search("unique_[a-z0-9]{32}", arg) |
698 mo = re.search("unique_[a-z0-9]{32}", arg) |
698 if mo is not None: |
699 if mo is not None: |