X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=mimedecode.py;h=1e3bf74b3964717de33883c8b160c19db805f664;hb=63f035c2a1e63b84155a41adbaadfc842615a1d6;hp=9af561e90ddc4b87616c2d84f5041eae06be8ef9;hpb=1a8a783179df086c17df5c3cfc2e8aacf3cf6233;p=mimedecode.git diff --git a/mimedecode.py b/mimedecode.py index 9af561e..1e3bf74 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -312,7 +312,10 @@ def decode_part(msg): left_binary = False for content_type in masks: - if content_type in g.binary_mask: + if content_type in g.totext_mask or \ + content_type in g.decoded_binary_mask: + break + elif content_type in g.binary_mask: left_binary = True break