diff options
| author | bwarsaw | 2001-10-24 06:53:39 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-10-24 06:53:39 +0000 |
| commit | a7742fb3ca1ea7b507ceb1231aeb198c4e5a5c0a (patch) | |
| tree | 24afbdf9bc3c46b060c7c016a070d06482c6669d | |
| parent | 35813c1876aaa1871f79c3acebddb2dc1cd61cfe (diff) | |
| download | mailman-a7742fb3ca1ea7b507ceb1231aeb198c4e5a5c0a.tar.gz mailman-a7742fb3ca1ea7b507ceb1231aeb198c4e5a5c0a.tar.zst mailman-a7742fb3ca1ea7b507ceb1231aeb198c4e5a5c0a.zip | |
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.
| -rw-r--r-- | Mailman/Archiver/pipermail.py | 12 |
1 files 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) |
