X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=mimedecode.py;h=d6930b7e02e25d6eab3e31960911c67c5a267b2a;hb=6f852632ad7a00b830aa75f4050897b89c74724a;hp=179f82dbdc84d558c66d50b0bf8d34239261ae41;hpb=2dc3c38ce9f828003405e5f9f76f9fce96d1b0ca;p=mimedecode.git diff --git a/mimedecode.py b/mimedecode.py index 179f82d..d6930b7 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -35,10 +35,10 @@ Usage: %s [-h|--help] [-V|--version] [-cCDP] [-f charset] [-d header] [-p header sys.exit(code) -def output(s, outfile = sys.stdout): +def output(s, outfile=sys.stdout): outfile.write(s) -def output_headers(msg, outfile = sys.stdout): +def output_headers(msg, outfile=sys.stdout): unix_from = msg.get_unixfrom() if unix_from: output(unix_from + os.linesep) @@ -288,9 +288,10 @@ class GlobalOptions: from m_lib.defenc import default_encoding recode_charset = 1 # recode charset of message body - decode_headers = ["Subject", "From"] # A list of headers to decode - decode_header_params = [("Content-Type", "name"), - ("Content-Disposition", "filename") + decode_headers = ["From", "Subject"] # A list of headers to decode + decode_header_params = [ + ("Content-Type", "name"), + ("Content-Disposition", "filename"), ] # A list of headers' parameters to decode totext_mask = [] # A list of content-types to decode