From f1f4cbef9bac93dcfb58a0acd7bec8ff26824c50 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 24 Feb 2020 16:58:26 +0100 Subject: [PATCH] lib/sentry: fix SentryIgnoredException not being ignored correctly --- passbook/lib/sentry.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/passbook/lib/sentry.py b/passbook/lib/sentry.py index d803ef729..e20831355 100644 --- a/passbook/lib/sentry.py +++ b/passbook/lib/sentry.py @@ -32,11 +32,13 @@ def before_send(event, hint): ValidationError, OSError, RedisError, - SentryIgnoredException, ) if "exc_info" in hint: _exc_type, exc_value, _ = hint["exc_info"] - if isinstance(exc_value, ignored_classes): + # pylint: disable=consider-merging-isinstance + if isinstance(exc_value, ignored_classes) or isinstance( + exc_value, SentryIgnoredException + ): LOGGER.info("Supressing error %r", exc_value) return None return event