]> git.phdru.name Git - mimedecode.git/commitdiff
Add a few comments
authorOleg Broytman <phd@phdru.name>
Sun, 2 Mar 2014 19:33:50 +0000 (23:33 +0400)
committerOleg Broytman <phd@phdru.name>
Sun, 2 Mar 2014 19:33:50 +0000 (23:33 +0400)
mimedecode.py

index 1e5b18b388dbcb2d6104c12911742181648118fc..8ea6922ff02743f2fa700f770581b6f1738e0999 100755 (executable)
@@ -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: