[Mailman-Developers] Archiver.py bug ?
Thomas Wouters
thomas@xs4all.net
Wed, 9 Feb 2000 10:41:47 +0100
--TB36FDmn/VVEgNH/
Content-Type: text/plain; charset=us-ascii
I ran across this in my errors log:
Traceback (innermost last):
File "/usr/local/mailman/Mailman/Archiver/Archiver.py", line 212, in ArchiveMail
self.__archive_to_mbox(msg)
File "/usr/local/mailman/Mailman/Archiver/Archiver.py", line 168, in __archive_to_mbox
post.SetHeader('Date', time.ctime(time.time()))
post is a Mailman.Message.Message instance, which is a subclass of
rfc822.Message... But neither of those objects define a SetHeader method,
and the two calls to SetHeader in Archiver.py are the only calls in Mailman
to that particular method. An old leftover, perhaps ? The attached patch
should fix it.
--
Thomas Wouters <thomas@xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
--TB36FDmn/VVEgNH/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mailman.diffd"
Index: Mailman/Archiver/Archiver.py
===================================================================
RCS file: /projects/cvsroot/mailman/Mailman/Archiver/Archiver.py,v
retrieving revision 1.18
diff -u -r1.18 Archiver.py
--- Archiver.py 1999/12/25 14:37:38 1.18
+++ Archiver.py 2000/02/09 09:25:12
@@ -163,7 +163,7 @@
if self.clobber_date:
import time
olddate = post.getheader('date')
- post.SetHeader('Date', time.ctime(time.time()))
+ post['Date'] = time.ctime(time.time())
try:
afn = self.ArchiveFileName()
mbox = self.__archive_file(afn)
@@ -176,7 +176,7 @@
reraise()
if self.clobber_date:
# Resurrect original date setting.
- post.SetHeader('Date', olddate)
+ post['Date'] = olddate
def ExternalArchive(self, ar, txt):
d = SafeDict({'listname': self.internal_name()})
--TB36FDmn/VVEgNH/--