]> git.phdru.name Git - mimedecode.git/commitdiff
Refactor else+if to elif
authorOleg Broytman <phd@phdru.name>
Mon, 10 Feb 2014 20:22:15 +0000 (00:22 +0400)
committerOleg Broytman <phd@phdru.name>
Mon, 10 Feb 2014 20:22:15 +0000 (00:22 +0400)
mimedecode.py

index 884f3582dd2b6b6987787b093623199bb4fddad0..9db427893301d1455214134f1d6cbddde0d6738a 100755 (executable)
@@ -258,12 +258,11 @@ def decode_message(msg):
         if msg.epilogue:
             output(msg.epilogue)
 
-    else:
-        if msg.has_key("Content-Type"): # Simple one-part message - decode it
-            decode_part(msg)
+    elif msg.has_key("Content-Type"): # Simple one-part message - decode it
+        decode_part(msg)
 
-        else: # Not a message, just text - copy it literally
-            output(msg.as_string())
+    else: # Not a message, just text - copy it literally
+        output(msg.as_string())
 
 
 class GlobalOptions: