From 6992e4913e00e659a3d7890cd7546bc9079b8843 Mon Sep 17 00:00:00 2001 From: Sandy Carter Date: Mon, 27 Oct 2014 09:43:09 -0400 Subject: [PATCH] Don't log except_osv exceptions --- sentry_logger/odoo_sentry_handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sentry_logger/odoo_sentry_handler.py b/sentry_logger/odoo_sentry_handler.py index 0fc216ce5..04edb951d 100644 --- a/sentry_logger/odoo_sentry_handler.py +++ b/sentry_logger/odoo_sentry_handler.py @@ -21,13 +21,14 @@ ############################################################################### from openerp.osv.orm import except_orm +from openerp.osv.osv import except_osv from raven.handlers.logging import SentryHandler class OdooSentryHandler(SentryHandler, object): def can_record(self, record): - if record.exc_info and record.exc_info[0] is except_orm: + if record.exc_info and record.exc_info[0] in (except_orm, except_osv): return False if record.module == 'osv' and record.msg == 'Uncaught exception': return False