Projet

Général

Profil

0001-ApplicationLogger-do-not-send-email-when-error_email.patch

Christophe Siraut, 10 décembre 2019 17:59

Télécharger (1,13 ko)

Voir les différences:

Subject: [PATCH] ApplicationLogger: do not send email when error_email is not
 set (#38362)

 wcs/qommon/logger.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
wcs/qommon/logger.py
23 23

  
24 24
class ApplicationLogger(DefaultLogger):
25 25
    def log_internal_error(self, error_summary, error_msg, tech_id=None):
26
        self.log('exception caught')
27
        self.error_log.write(error_msg)
28 26
        if self.error_email:
29 27
            from .emails import email
30 28
            headers = {}
......
37 35
                  want_html=False,
38 36
                  fire_and_forget=True,
39 37
                  extra_headers=headers)
38
        else:
39
            self.log('exception caught')
40
            self.error_log.write(error_msg)
40 41

  
41 42

  
42 43
class BotFilter(logging.Filter):
43
-