Skip to content

Commit

Permalink
Don't fail to finalize observers if one fails (#811)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradengroom committed Oct 25, 2023
1 parent 1142489 commit 8c44633
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion baseplate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,10 @@ def finish(self, exc_info: Optional[_ExcInfo] = None) -> None:
"""
for observer in self.observers:
observer.on_finish(exc_info)
try:
observer.on_finish(exc_info)
except Exception:
logger.exception("Exception raised while finalizing observer")

# clean up reference cycles
self.context = None # type: ignore
Expand Down

0 comments on commit 8c44633

Please sign in to comment.