Update of /cvsroot/mailman/mailman/Mailman/Handlers
In directory sc8-pr-cvs1:/tmp/cvs-serv13487

Modified Files:
      Tag: Release_2_1-maint
        ToDigest.py 
Log Message:
send_i18n_digests(): Configurations can change between the time a
message is originally received and the time the digest is sent.  If
the configuration changes by setting ARCHIVE_HTML_SANITIZER to 0, a
DiscardMessage exception can occur during the scrubbing.  Catch this
error.

Closes SF #860135 with basic solution by Martin Pool.


Index: ToDigest.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/ToDigest.py,v
retrieving revision 2.22.2.4
retrieving revision 2.22.2.5
diff -u -d -r2.22.2.4 -r2.22.2.5
--- ToDigest.py 22 Sep 2003 02:37:51 -0000      2.22.2.4
+++ ToDigest.py 16 Dec 2003 05:11:07 -0000      2.22.2.5
@@ -44,6 +44,7 @@
 from Mailman import Utils
 from Mailman import Message
 from Mailman import i18n
+from Mailman import Errors
 from Mailman.Mailbox import Mailbox
 from Mailman.MemberAdaptor import ENABLED
 from Mailman.Handlers.Decorate import decorate
@@ -301,7 +302,11 @@
             print >> plainmsg, separator30
             print >> plainmsg
         # Use Mailman.Handlers.Scrubber.process() to get plain text
-        msg = scrubber(mlist, msg)
+        try:
+            msg = scrubber(mlist, msg)
+        except Errors.DiscardMessage:
+            print >> plainmsg, _('[Message discarded by content filter]')
+            continue
         # Honor the default setting
         for h in mm_cfg.PLAIN_DIGEST_KEEP_HEADERS:
             if msg[h]:



_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to