diff roundup/mailgw.py @ 5306:91354bf0b683

Codecov showed text/html followed by text/plain not tested. Fixed bug discovered. The html part was double attached. Removed an unneeded attachment call. Added some more test cases. Reworked test code to make selecting html filter tool easier.
author John Rouillard <rouilj@ieee.org>
date Fri, 13 Oct 2017 22:56:42 -0400
parents e20f472fde7d
children 57caeefb2f81
line wrap: on
line diff
--- a/roundup/mailgw.py	Fri Oct 13 21:46:59 2017 -0400
+++ b/roundup/mailgw.py	Fri Oct 13 22:56:42 2017 -0400
@@ -425,8 +425,8 @@
                         attachments.append(part.text_as_attachment())
                     elif html_part_found:
                         # text/plain part found after html
-                        # save html as attachment
-                        attachments.append(cpart.as_attachment())
+                        # text/html already stored as attachment,
+                        # so just use the text as the content.
                         content = new_content
                         cpart   = part
                     else:

Roundup Issue Tracker: http://roundup-tracker.org/