senddigests doesn't handle consecutive unparseable messages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
Fix Released
|
Medium
|
Unassigned |
Bug Description
The following code fragment in send_i18n_digests in Mailman/
Handlers/
several consecutive messages that are unparseable:
msg = mbox.next()
while msg is not None:
if msg == '':
# It was an unparseable message
msg = mbox.next()
[...]
# Get the next message in the digest mailbox
msg = mbox.next()
I'm not that familiar with Python but I think that the following code
should fix the problem:
while 1:
msg = mbox.next()
if msg is None:
break
if msg == '':
# It was an unparseable message
continue
[...]
[http://
This bug is still present and hit our mailman installation
last friday. The problem occurs if the unparseable message
is the last one, too.
Here is a patch against current CVS, effectively doing the
same as Andreas Voegele suggested, but with cleaner code.
Unfortunately this tracker doesn't allow me to attach it,
because I didn't submit this bug.
diff -u -r2.28 ToDigest.py Handlers/ ToDigest. py 15 Aug 2003 21:06:28 -0000 2.28 Handlers/ ToDigest. py 13 Sep 2004 12:22:03 -0000
messages. append( msg)
--- Mailman/
+++ Mailman/
@@ -210,6 +210,7 @@
if msg == '':
# It was an unparseable message
msg = mbox.next()
+ continue
msgcount += 1
# Get the Subject header