chiark / gitweb /
Allow importing of 'application/octet-stream' attachments
authorCatalin Marinas <catalin.marinas@gmail.com>
Wed, 30 Sep 2009 20:47:31 +0000 (21:47 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Wed, 30 Sep 2009 20:47:31 +0000 (21:47 +0100)
Some mail clients use this MIME type rather than text/plain.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/commands/common.py

index 0d39148e17d50058c7fdb97cf3aee87bd3206835..0922b5ddfa0a14f9537e3fa5345b132aa7bf6ca7 100644 (file)
@@ -424,7 +424,8 @@ def parse_mail(msg):
     # the rest of the message
     msg_text = ''
     for part in msg.walk():
     # the rest of the message
     msg_text = ''
     for part in msg.walk():
-        if part.get_content_type() == 'text/plain':
+        if part.get_content_type() in ['text/plain',
+                                       'application/octet-stream']:
             msg_text += part.get_payload(decode = True)
 
     rem_descr, diff = __split_descr_diff(msg_text)
             msg_text += part.get_payload(decode = True)
 
     rem_descr, diff = __split_descr_diff(msg_text)