diff options
| author | bwarsaw | 2002-08-15 02:42:47 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-08-15 02:42:47 +0000 |
| commit | f012f46eee538162c1ca14e39a2e9f288898baec (patch) | |
| tree | f94470cf033f631051e2e68af6795f63bf87c85e /Mailman/Handlers/MimeDel.py | |
| parent | 7d4466401b413190b19ae2ffc6ae179b5ecd3613 (diff) | |
| download | mailman-f012f46eee538162c1ca14e39a2e9f288898baec.tar.gz mailman-f012f46eee538162c1ca14e39a2e9f288898baec.tar.zst mailman-f012f46eee538162c1ca14e39a2e9f288898baec.zip | |
process(): Correct typo: "multipart" -> "multipart/alternative".
reset_payload(): Don't hack on the trailing newline here. Probably do
it in Decorate.py instead.
Diffstat (limited to 'Mailman/Handlers/MimeDel.py')
| -rw-r--r-- | Mailman/Handlers/MimeDel.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Mailman/Handlers/MimeDel.py b/Mailman/Handlers/MimeDel.py index bff8aadd8..18467adfc 100644 --- a/Mailman/Handlers/MimeDel.py +++ b/Mailman/Handlers/MimeDel.py @@ -72,7 +72,7 @@ def process(mlist, msg, msgdata): # and then copy over its Content-Type: and Content-Transfer-Encoding: # headers (any others?). collapse_multipart_alternatives(msg) - if mtype == 'multipart': + if mtype == 'multipart/alternative': firstalt = msg.get_payload(0) reset_payload(msg, firstalt) # If we removed some parts, make note of this @@ -97,10 +97,6 @@ def process(mlist, msg, msgdata): def reset_payload(msg, subpart): # Reset payload of msg to contents of subpart, and fix up content headers payload = subpart.get_payload() - # Add a trailing newline to a text/plain, if it's missing one. BAW: do we - # need to look for CRLF line endings? - if subpart.get_content_type() == 'text/plain' and payload[-1] <> '\n': - payload += '\n' msg.set_payload(payload) del msg['content-type'] del msg['content-transfer-encoding'] |
