Add debug messages in notifications.py
This commit is contained in:
@@ -227,7 +227,8 @@ class EMailNotification(BaseNotification):
|
|||||||
self.logger.debug(
|
self.logger.debug(
|
||||||
"{}: content mimetype is {}".format(
|
"{}: content mimetype is {}".format(
|
||||||
queueid, mimetype))
|
queueid, mimetype))
|
||||||
|
self.logger.debug(
|
||||||
|
"{}: creating BeatufilSoup object".format(queueid))
|
||||||
return BeautifulSoup(text, "lxml")
|
return BeautifulSoup(text, "lxml")
|
||||||
|
|
||||||
def get_text_multipart(self, queueid, msg, preferred=_html_text):
|
def get_text_multipart(self, queueid, msg, preferred=_html_text):
|
||||||
@@ -327,13 +328,17 @@ class EMailNotification(BaseNotification):
|
|||||||
# replace picture sources
|
# replace picture sources
|
||||||
image_replaced = False
|
image_replaced = False
|
||||||
if self.strip_images:
|
if self.strip_images:
|
||||||
|
self.logger.debug(
|
||||||
|
"{}: looking for images to strip".format(queueid)
|
||||||
for element in soup("img"):
|
for element in soup("img"):
|
||||||
if "src" in element.attrs.keys():
|
if "src" in element.attrs.keys():
|
||||||
self.logger.debug(
|
self.logger.debug(
|
||||||
"{}: removing image: {}".format(
|
"{}: strip image: {}".format(
|
||||||
queueid, element["src"]))
|
queueid, element["src"]))
|
||||||
element.extract()
|
element.extract()
|
||||||
elif self.replacement_img:
|
elif self.replacement_img:
|
||||||
|
self.logger.debug(
|
||||||
|
"{}: looking for images to replace".format(queueid)
|
||||||
for element in soup("img"):
|
for element in soup("img"):
|
||||||
if "src" in element.attrs.keys():
|
if "src" in element.attrs.keys():
|
||||||
self.logger.debug(
|
self.logger.debug(
|
||||||
|
|||||||
Reference in New Issue
Block a user