From: Catalin Marinas Date: Wed, 30 Sep 2009 20:47:31 +0000 (+0100) Subject: Allow importing of 'application/octet-stream' attachments X-Git-Tag: v0.15-rc4~8 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/bb78b348dc213336c3056f982a8fd370bdc6f9d0?ds=sidebyside Allow importing of 'application/octet-stream' attachments Some mail clients use this MIME type rather than text/plain. Signed-off-by: Catalin Marinas --- diff --git a/stgit/commands/common.py b/stgit/commands/common.py index 0d39148..0922b5d 100644 --- a/stgit/commands/common.py +++ b/stgit/commands/common.py @@ -424,7 +424,8 @@ def parse_mail(msg): # 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)