summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2002-10-09 03:55:13 +0000
committerbwarsaw2002-10-09 03:55:13 +0000
commitd61741424e5f7e887c72511c8aa13454fb496ec9 (patch)
tree9c1019eebc23ae15f284fc7b0775a3cd4b78a64b
parentef42ebd2ed12925710cdbf8d2a073cab363dbfdc (diff)
downloadmailman-d61741424e5f7e887c72511c8aa13454fb496ec9.tar.gz
mailman-d61741424e5f7e887c72511c8aa13454fb496ec9.tar.zst
mailman-d61741424e5f7e887c72511c8aa13454fb496ec9.zip
processUnixMailbox(): Small but useful refactoring. Don't pass the
article class as an argument. Instead call out to an override-able method _makeArticle() to return the article instance. This will be overridden in HyperArch.py. Bump __version__ while we're at it.
Diffstat (limited to '')
-rw-r--r--Mailman/Archiver/pipermail.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Mailman/Archiver/pipermail.py b/Mailman/Archiver/pipermail.py
index 2907a9915..cd6c6d522 100644
--- a/Mailman/Archiver/pipermail.py
+++ b/Mailman/Archiver/pipermail.py
@@ -10,7 +10,7 @@ import cPickle as pickle
from cStringIO import StringIO
from string import lowercase
-__version__ = '0.08 (Mailman edition)'
+__version__ = '0.09 (Mailman edition)'
VERSION = __version__
CACHESIZE = 100 # Number of slots in the cache
@@ -523,8 +523,10 @@ class T:
# and create a series of Article objects. Each article
# object will then be archived.
- def processUnixMailbox(self, input, articleClass=Article,
- start=None, end=None):
+ def _makeArticle(self, msg, sequence):
+ return Article(msg, sequence)
+
+ def processUnixMailbox(self, input, start=None, end=None):
mbox = ArchiverMailbox(input, self.maillist)
if start is None:
start = 0
@@ -554,7 +556,7 @@ class T:
continue
msgid = m.get('message-id', 'n/a')
self.message(_('#%(counter)05d %(msgid)s'))
- a = articleClass(m, self.sequence)
+ a = self._makeArticle(m, self.sequence)
self.sequence += 1
self.add_article(a)
if end is not None and counter >= end: