From 5ff72dc5e7e8c67e29e6cb8147eaa1105447341e Mon Sep 17 00:00:00 2001 From: Thomas Oettli Date: Tue, 22 Oct 2019 22:29:06 +0200 Subject: [PATCH] Add debug messages in notifications.py --- pyquarantine/notifications.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pyquarantine/notifications.py b/pyquarantine/notifications.py index 54a1a97..3911e46 100644 --- a/pyquarantine/notifications.py +++ b/pyquarantine/notifications.py @@ -227,7 +227,8 @@ class EMailNotification(BaseNotification): self.logger.debug( "{}: content mimetype is {}".format( queueid, mimetype)) - + self.logger.debug( + "{}: creating BeatufilSoup object".format(queueid)) return BeautifulSoup(text, "lxml") def get_text_multipart(self, queueid, msg, preferred=_html_text): @@ -327,13 +328,17 @@ class EMailNotification(BaseNotification): # replace picture sources image_replaced = False if self.strip_images: + self.logger.debug( + "{}: looking for images to strip".format(queueid) for element in soup("img"): if "src" in element.attrs.keys(): self.logger.debug( - "{}: removing image: {}".format( + "{}: strip image: {}".format( queueid, element["src"])) element.extract() elif self.replacement_img: + self.logger.debug( + "{}: looking for images to replace".format(queueid) for element in soup("img"): if "src" in element.attrs.keys(): self.logger.debug(