From b4bcf7032c5374be2c52de0dd88c16bd36d9f040 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 18 Mar 2014 03:08:01 +0400 Subject: [PATCH] Avoid calling get_content_maintype, just split ctype instead --- mimedecode.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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('*/*') -- 2.39.5