On Wed, 2003-08-06 at 19:24, Barry Warsaw wrote:

> If this patch works, then I'll probably apply it as a fallback, but I'll
> want to make sure the scrubber is fixed too, otherwise it's possible
> that your mbox archive is also broken (though you wouldn't notice it
> until you regenerated your pipermail archives).

This dawned on me at practice.  The previous patch was probably no good,
but this one might be <wink>.  I'll test it out tomorrow night.

-Barry


Index: ToDigest.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/ToDigest.py,v
retrieving revision 2.27
diff -u -r2.27 ToDigest.py
--- ToDigest.py	11 Apr 2003 03:06:14 -0000	2.27
+++ ToDigest.py	7 Aug 2003 03:42:19 -0000
@@ -74,8 +74,13 @@
         mboxfp = open(mboxfile, 'a+')
     finally:
         os.umask(omask)
-    g = Generator(mboxfp)
-    g.flatten(msg, unixfrom=True)
+    # Get the message as a string, with the envelope, which is required by the
+    # UnixMailbox code which composes the digest.
+    msgstr = msg.as_string(unixfrom=True)
+    extra = not msgstr.endswith('\n\n')
+    mboxfp.write(msgstr)
+    if extra:
+        mboxfp.write('\n\n')
     # 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
_______________________________________________
Mailman-Developers mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-developers

Reply via email to