Roundup Tracker - Issues

Message6239

Author schlatterbeck
Recipients schlatterbeck
Date 2018-09-05.14:44:35
Message-id <1536158677.59.0.56676864532.issue2551000@psf.upfronthosting.co.za>
In-reply-to
Tested with python2.7, not python3:

The mail parsing in mailgw.py in class RoundupMessage (which now
inherits from email.message.Message) relies on recursively parsing mails
using the method extract_content. After the unpacking step this fails
because get_payload returns a email.message.Message object, not a
RoundupMessage, so subsequent recursive calls fail because the object
has no extract_content method. The traceback (for an attachment of type
message/rfc822 but any multipart mail currently fails) is given below.

Looks like we currently don't have any multipart examples in the mail
gateway tests?

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/roundup/mailgw.py", line
1450, in handle_Message
    return self.handle_message(message)
  File "/usr/local/lib/python2.7/dist-packages/roundup/mailgw.py", line
1521, in handle_message
    return self._handle_message(message)
  File "/usr/local/lib/python2.7/dist-packages/roundup/mailgw.py", line
1533, in _handle_message
    nodeid = self.parsed_message.parse ()
  File "/usr/local/lib/python2.7/dist-packages/roundup/mailgw.py", line
1196, in parse
    ret = method()
  File "/usr/local/lib/python2.7/dist-packages/roundup/mailgw.py", line
1005, in get_content_and_attachments
    html2text=html2text )
  File "/usr/local/lib/python2.7/dist-packages/roundup/mailgw.py", line
309, in extract_content
    new_content, new_attach, html_part = part.extract_content(
AttributeError: Message instance has no attribute 'extract_content'
History
Date User Action Args
2018-09-05 14:44:37schlatterbecksetrecipients: + schlatterbeck
2018-09-05 14:44:37schlatterbecksetmessageid: <1536158677.59.0.56676864532.issue2551000@psf.upfronthosting.co.za>
2018-09-05 14:44:37schlatterbecklinkissue2551000 messages
2018-09-05 14:44:35schlatterbeckcreate