Update of /cvsroot/mailman/mailman/Mailman/Handlers
In directory sc8-pr-cvs1:/tmp/cvs-serv6545/Mailman/Handlers
Modified Files:
Tag: Release_2_1-maint
CookHeaders.py Moderate.py Scrubber.py ToDigest.py
Log Message:
Backporting from the HEAD -- updated handlers
Index: CookHeaders.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/CookHeaders.py,v
retrieving revision 2.33.2.2
retrieving revision 2.33.2.3
diff -u -d -r2.33.2.2 -r2.33.2.3
--- CookHeaders.py 31 Mar 2003 21:49:42 -0000 2.33.2.2
+++ CookHeaders.py 22 Sep 2003 02:37:51 -0000 2.33.2.3
@@ -169,7 +169,7 @@
if mlist.description:
# Make sure description is properly i18n'd
listid_h = uheader(mlist, mlist.description, 'List-Id')
- listid_h.append(' ' + listid, 'us-ascii')
+ listid_h.append(listid, 'us-ascii')
else:
# For wrapping
listid_h = Header(listid, 'us-ascii', header_name='List-Id')
Index: Moderate.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/Moderate.py,v
retrieving revision 2.13
retrieving revision 2.13.2.1
diff -u -d -r2.13 -r2.13.2.1
--- Moderate.py 31 Dec 2002 03:28:41 -0000 2.13
+++ Moderate.py 22 Sep 2003 02:37:51 -0000 2.13.2.1
@@ -1,4 +1,4 @@
-# Copyright (C) 2001,2002 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2003 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
@@ -45,7 +45,7 @@
def process(mlist, msg, msgdata):
- if msgdata.get('approved'):
+ if msgdata.get('approved') or msgdata.get('fromusenet'):
return
# First of all, is the poster a member or not?
for sender in msg.get_senders():
Index: Scrubber.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/Scrubber.py,v
retrieving revision 2.18.2.3
retrieving revision 2.18.2.4
diff -u -d -r2.18.2.3 -r2.18.2.4
--- Scrubber.py 8 Feb 2003 07:13:50 -0000 2.18.2.3
+++ Scrubber.py 22 Sep 2003 02:37:51 -0000 2.18.2.4
@@ -301,8 +301,11 @@
try:
t = unicode(t, partcharset, 'replace')
except (UnicodeError, LookupError):
- # Replace funny characters
- t = unicode(t, 'ascii', 'replace').encode('ascii')
+ # Replace funny characters. We use errors='replace' for
+ # both calls since the first replace will leave U+FFFD,
+ # which isn't ASCII encodeable.
+ u = unicode(t, 'ascii', 'replace')
+ t = u.encode('ascii', 'replace')
try:
# Should use HTML-Escape, or try generalizing to UTF-8
t = t.encode(charset, 'replace')
Index: ToDigest.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/ToDigest.py,v
retrieving revision 2.22.2.3
retrieving revision 2.22.2.4
diff -u -d -r2.22.2.3 -r2.22.2.4
--- ToDigest.py 19 Apr 2003 04:57:14 -0000 2.22.2.3
+++ ToDigest.py 22 Sep 2003 02:37:51 -0000 2.22.2.4
@@ -44,6 +44,7 @@
from Mailman import Utils
from Mailman import Message
from Mailman import i18n
+from Mailman.Mailbox import Mailbox
from Mailman.MemberAdaptor import ENABLED
from Mailman.Handlers.Decorate import decorate
from Mailman.Queue.sbcache import get_switchboard
@@ -74,8 +75,8 @@
mboxfp = open(mboxfile, 'a+')
finally:
os.umask(omask)
- g = Generator(mboxfp)
- g.flatten(msg, unixfrom=True)
+ mbox = Mailbox(mboxfp)
+ mbox.AppendMessage(msg)
# Calculate the current size of the accumulation file. This will not tell
# us exactly how big the MIME, rfc1153, or any other generated digest
# message will be, but it's the most easily available metric to decide
_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-checkins