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