From: Oleg Broytman Date: Mon, 17 Mar 2014 23:08:01 +0000 (+0400) Subject: Avoid calling get_content_maintype, just split ctype instead X-Git-Tag: v2.5.0~1 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=b4bcf7032c5374be2c52de0dd88c16bd36d9f040;p=mimedecode.git Avoid calling get_content_maintype, just split ctype instead --- diff --git a/mimedecode.py b/mimedecode.py index 48f6f7e..48a6aba 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -321,8 +321,7 @@ def decode_part(msg): ctype = msg.get_content_type() if ctype: masks.append(ctype) - mtype = msg.get_content_maintype() - if mtype: + mtype = ctype.split('/')[0] masks.append(mtype + '/*') masks.append('*/*')