Skip to content

Commit

Permalink
utils:helpers - ExceptionManager always catches explicitly declared e…
Browse files Browse the repository at this point in the history
…xceptions
  • Loading branch information
MatteoCampinoti94 committed Nov 21, 2023
1 parent fa89e5d commit 011c096
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion acacore/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ def __exit__(
if not exc_type:
return False

return any(issubclass(exc_type, e) for e in self.catch) and not any(issubclass(exc_type, e) for e in self.allow)
return any(issubclass(exc_type, e) for e in self.catch) and (
exc_type in self.catch or not any(issubclass(exc_type, e) for e in self.allow)
)

0 comments on commit 011c096

Please sign in to comment.