diff options
author | bwarsaw <> | 2003-12-16 05:11:07 +0000 |
---|---|---|
committer | bwarsaw <> | 2003-12-16 05:11:07 +0000 |
commit | 9d78d653a0e8dd7d762b520bdd311fbbf483e2c5 (patch) | |
tree | 7b85438e4c1411d291f64a936b02fe6564deccb8 /Mailman/Handlers/ToDigest.py | |
parent | 87bd68cb93a11cf332fc62074009e0ba2c4e9c9f (diff) | |
download | mailman2-9d78d653a0e8dd7d762b520bdd311fbbf483e2c5.tar.gz mailman2-9d78d653a0e8dd7d762b520bdd311fbbf483e2c5.tar.xz mailman2-9d78d653a0e8dd7d762b520bdd311fbbf483e2c5.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Handlers/ToDigest.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Mailman/Handlers/ToDigest.py b/Mailman/Handlers/ToDigest.py index 5d354473..525cafd0 100644 --- a/Mailman/Handlers/ToDigest.py +++ b/Mailman/Handlers/ToDigest.py @@ -44,6 +44,7 @@ from Mailman import mm_cfg 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 @@ def send_i18n_digests(mlist, mboxfp): 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]: |