summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2003-08-15 21:06:28 +0000
committerbwarsaw2003-08-15 21:06:28 +0000
commitf40c3af4cb015417569ca26d9922438b281aa470 (patch)
tree028311bdabc0ece1b71868763b3a8a1ba35b9c05
parentae6fc3270ddc40891777cf2aa95b8c049fc53106 (diff)
downloadmailman-f40c3af4cb015417569ca26d9922438b281aa470.tar.gz
mailman-f40c3af4cb015417569ca26d9922438b281aa470.tar.zst
mailman-f40c3af4cb015417569ca26d9922438b281aa470.zip
process(): Use Mailman's Mailbox object to append new messages to the
digest.mbox file. This is the same technique that the archiver uses, and should fix Chuq's problem with missing trailing newline separators in digest messages.
-rw-r--r--Mailman/Handlers/ToDigest.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Mailman/Handlers/ToDigest.py b/Mailman/Handlers/ToDigest.py
index b25b1f4fa..5d354473c 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.Mailbox import Mailbox
from Mailman.MemberAdaptor import ENABLED
from Mailman.Handlers.Decorate import decorate
from Mailman.Queue.sbcache import get_switchboard
@@ -74,8 +75,8 @@ def process(mlist, msg, msgdata):
mboxfp = open(mboxfile, 'a+')
finally:
os.umask(omask)
- g = Generator(mboxfp)
- g.flatten(msg, unixfrom=True)
+ mbox = Mailbox(mboxfp)
+ mbox.AppendMessage(msg)
# Calculate the current size of the accumulation file. This will not tell
# us exactly how big the MIME, rfc1153, or any other generated digest
# message will be, but it's the most easily available metric to decide