From da30350f252527689adaa38118e6882adde64df4 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 2 Mar 2014 23:33:50 +0400 Subject: [PATCH] Add a few comments --- mimedecode.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mimedecode.py b/mimedecode.py index 1e5b18b..8ea6922 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -102,11 +102,12 @@ def decode_headers(msg): for header in gopts.remove_all_params: value = msg[header] - if value is None: + if value is None: # No such header continue - if ';' not in value: + if ';' not in value: # There are no parameters continue - del msg[header] + del msg[header] # Delete all such headers + # Get the value without parameters and set it back msg[header] = value.split(';')[0].strip() for header, param in gopts.remove_header_params: -- 2.39.5