Skip to content

Commit

Permalink
catch integrityerror to avoid exiting
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksanders committed May 14, 2021
1 parent 5944e52 commit 8770109
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions repokid/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,8 @@ def store(self, fields: Optional[List[str]] = None) -> None:
role.store(fields=fields)
except RoleStoreError as e:
logger.error("could not store role %s: %s", role.arn, e, exc_info=True)
except IntegrityError as e:
logger.error("could not store role %s: %s", role.arn, e, exc_info=True)

def update_stats(self, source: str = "Scan", store: bool = True) -> None:
for role in self.roles:
Expand Down

0 comments on commit 8770109

Please sign in to comment.