From: Oleg Broytman Date: Mon, 10 Feb 2014 20:22:15 +0000 (+0400) Subject: Refactor else+if to elif X-Git-Tag: v2.3.4~1 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;ds=sidebyside;h=920712936a4106f6d0187dbeda4cf585c9244739;p=mimedecode.git Refactor else+if to elif --- diff --git a/mimedecode.py b/mimedecode.py index 884f358..9db4278 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -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: