diff roundup/mailgw.py @ 4375:378fc1ecaaa6

Default to "text/plain" if no Content-Type header is present in email (thanks Hauke Duden)
author Richard Jones <richard@users.sourceforge.net>
date Mon, 19 Apr 2010 03:56:54 +0000
parents 18cc4323e2ad
children 863ec554525c
line wrap: on
line diff
--- a/roundup/mailgw.py	Mon Apr 19 00:39:01 2010 +0000
+++ b/roundup/mailgw.py	Mon Apr 19 03:56:54 2010 +0000
@@ -246,6 +246,10 @@
 
     def getheader(self, name, default=None):
         hdr = mimetools.Message.getheader(self, name, default)
+        # TODO are there any other False values possible?
+        # TODO if not hdr: return hdr
+        if hdr is None:
+            return None
         if not hdr:
             return ''
         if hdr:

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