Code

Default to "text/plain" if no Content-Type header is present in email (thanks Hauke...
[roundup.git] / roundup / mailgw.py
index 5055756c948c478b27624929f57ca78201696b6a..61f3cdfa8ba95aa38f87550eb4de888ed1791bc2 100644 (file)
@@ -246,6 +246,10 @@ class Message(mimetools.Message):
 
     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: