Add debug messages in notifications.py

This commit is contained in:
2019-10-22 22:29:06 +02:00
parent 5892d9a2b7
commit 5ff72dc5e7

View File

@@ -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(