From a7742fb3ca1ea7b507ceb1231aeb198c4e5a5c0a Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Wed, 24 Oct 2001 06:53:39 +0000 Subject: processUnixMailbox(): Instantiate an ArchiverMailbox instead of a UnixMailbox. The main difference being we pass in the MailList instance to the constructor, so all the magic of the message scrubber can work. --- Mailman/Archiver/pipermail.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Mailman/Archiver/pipermail.py b/Mailman/Archiver/pipermail.py index b810febe6..69e155d7f 100644 --- a/Mailman/Archiver/pipermail.py +++ b/Mailman/Archiver/pipermail.py @@ -10,11 +10,12 @@ import cPickle as pickle from cStringIO import StringIO from string import lowercase -__version__ = '0.07 (Mailman edition)' +__version__ = '0.08 (Mailman edition)' VERSION = __version__ CACHESIZE = 100 # Number of slots in the cache -from Mailman.Mailbox import Mailbox +from Mailman import Errors +from Mailman.Mailbox import ArchiverMailbox from Mailman.i18n import _ SPACE = ' ' @@ -517,9 +518,12 @@ class T: # object will then be archived. def processUnixMailbox(self, input, articleClass = Article): - mbox = Mailbox(input) + mbox = ArchiverMailbox(input, self.maillist) while 1: - m = mbox.next() + try: + m = mbox.next() + except Errors.DiscardMessage: + continue if not m: break a = articleClass(m, self.sequence) -- cgit v1.3.1