]> git.phdru.name Git - mimedecode.git/commitdiff
Avoid calling get_content_maintype, just split ctype instead
authorOleg Broytman <phd@phdru.name>
Mon, 17 Mar 2014 23:08:01 +0000 (03:08 +0400)
committerOleg Broytman <phd@phdru.name>
Mon, 17 Mar 2014 23:08:01 +0000 (03:08 +0400)
mimedecode.py

index 48f6f7e4293963f756d079b5d3ac479a0e312567..48a6aba65ff01450825798e128319e0479d4e917 100755 (executable)
@@ -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('*/*')