From ea4b42a6bc3d6fbd2a0199a398f2bcfde87696f7 Mon Sep 17 00:00:00 2001 From: Denis Mudarisov Date: Wed, 19 Feb 2020 12:43:41 +0500 Subject: [PATCH] :rainbow: pre-commit: pylint fix and disable --- mail_fix_553/mail_fix_553.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mail_fix_553/mail_fix_553.py b/mail_fix_553/mail_fix_553.py index 890f29d..b69c96d 100644 --- a/mail_fix_553/mail_fix_553.py +++ b/mail_fix_553/mail_fix_553.py @@ -1,3 +1,4 @@ +# pylint: disable=old-api7-method-defined,invalid-commit import base64 import logging import re @@ -5,7 +6,7 @@ from email.utils import formataddr from odoo import SUPERUSER_ID, tools from odoo.osv import osv -from odoo.tools.safe_eval import safe_eval as eval +from odoo.tools.safe_eval import safe_eval from odoo.tools.translate import _ from odoo.addons.base.ir.ir_mail_server import MailDeliveryException @@ -115,7 +116,7 @@ class MailMail(osv.Model): ) if mail.headers: try: - headers.update(eval(mail.headers)) + headers.update(safe_eval(mail.headers)) except Exception: pass