From 4d0a37a9b6f605d5ae9c8713359480e9eebc0c29 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 23 Feb 2014 23:50:42 +0400 Subject: [PATCH] Remove headers and parameters before decoding --- mimedecode.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mimedecode.py b/mimedecode.py index 1edd170..882034b 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -97,18 +97,18 @@ def decode_header_param(msg, header, param): def decode_headers(msg): "Decode message headers according to global options" - for header in gopts.decode_headers: - decode_header(msg, header) - - for header, param in gopts.decode_header_params: - decode_header_param(msg, header, param) - for header in gopts.remove_headers: del msg[header] for header, param in gopts.remove_header_params: msg.del_param(param, header) + for header in gopts.decode_headers: + decode_header(msg, header) + + for header, param in gopts.decode_header_params: + decode_header_param(msg, header, param) + def set_header(msg, header, value): "Replace header" -- 2.39.5