]> git.phdru.name Git - mimedecode.git/blobdiff - mimedecode.py
Change type guessing
[mimedecode.git] / mimedecode.py
index 0be095beb3cc21ac8fe8d594894af1b972916281..7604fb2dfb6104a2bd6349cbc36e730e19790e21 100755 (executable)
@@ -263,7 +263,7 @@ def decode_message(msg):
 
     if msg.is_multipart():
         decode_multipart(msg)
-    elif msg.has_key("Content-Type"): # Simple one-part message - decode it
+    elif len(msg): # Simple one-part message (there are headers) - decode it
         decode_part(msg)
     else: # Not a message, just text - copy it literally
         output(msg.as_string())