aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/Scrubber.py
diff options
context:
space:
mode:
authortkikuchi <>2006-01-29 05:12:26 +0000
committertkikuchi <>2006-01-29 05:12:26 +0000
commitd29d50fa39e93dc4faeeb97ad18f3d60abe4b2e8 (patch)
tree73f8e820815f5ae5a7d7b386c86d79ec5fe4cabc /Mailman/Handlers/Scrubber.py
parentaeaa447be7a74887c2b8264aea10172131672386 (diff)
downloadmailman2-d29d50fa39e93dc4faeeb97ad18f3d60abe4b2e8.tar.gz
mailman2-d29d50fa39e93dc4faeeb97ad18f3d60abe4b2e8.tar.xz
mailman2-d29d50fa39e93dc4faeeb97ad18f3d60abe4b2e8.zip
Back out Revision 2.18.2.19 patch for email.Message.set_payload() bug
because it is overwrapped in Mailman.Message.
Diffstat (limited to '')
-rw-r--r--Mailman/Handlers/Scrubber.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py
index a0c4896c..807e8cd6 100644
--- a/Mailman/Handlers/Scrubber.py
+++ b/Mailman/Handlers/Scrubber.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2005 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2006 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -164,12 +164,10 @@ def calculate_attachments_dir(mlist, msg, msgdata):
def replace_payload_by_text(msg, text, charset):
# TK: This is a common function in replacing the attachment and the main
- # message by a text (scrubbing). Also, add a flag indicating it has been
- # scrubbed.
+ # message by a text (scrubbing).
del msg['content-type']
del msg['content-transfer-encoding']
msg.set_payload(text, charset)
- msg['X-Mailman-Scrubbed'] = 'Yes'
@@ -344,12 +342,7 @@ Url : %(url)s
text.append(_('Skipped content of type %(partctype)s\n'))
continue
try:
- # Check if the part is replaced.
- if part.get('x-mailman-scrubbed'):
- decode = False
- else:
- decode = True
- t = part.get_payload(decode=decode)
+ t = part.get_payload(decode=True)
except binascii.Error:
t = part.get_payload()
# TK: get_content_charset() returns 'iso-2022-jp' for internally