From: Oleg Broytman Date: Sun, 8 Jun 2014 12:58:26 +0000 (+0400) Subject: Allow saving a message or a subpart to more than one file X-Git-Tag: v2.6.0~5 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=0d46ae8e42cfae5ba8d3c5838dc4f5bca57130bf;p=mimedecode.git Allow saving a message or a subpart to more than one file --- diff --git a/ChangeLog b/ChangeLog index e8b77c9..a63d023 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ Version 2.5.1 (2014-04-??) Open all files in binary mode. Output os.linesep instead of '\n'. + Test --save-headers|body|message masks one after another to allow + saving a message or a subpart to more than one file. Version 2.5.0 (2014-03-18) diff --git a/mimedecode.py b/mimedecode.py index 0714c87..6567e99 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -364,9 +364,9 @@ def decode_part(msg): for content_type in masks: if content_type in g.save_headers_mask: _save_message(msg, outstring, save_headers=True, save_body=False) - elif content_type in g.save_body_mask: + if content_type in g.save_body_mask: _save_message(msg, outstring, save_headers=False, save_body=True) - elif content_type in g.save_message_mask: + if content_type in g.save_message_mask: _save_message(msg, outstring, save_headers=True, save_body=True) for content_type in masks: