From 0d46ae8e42cfae5ba8d3c5838dc4f5bca57130bf Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 8 Jun 2014 16:58:26 +0400 Subject: [PATCH] Allow saving a message or a subpart to more than one file --- ChangeLog | 2 ++ mimedecode.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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: -- 2.39.5