Update of /cvsroot/mailman/mailman/Mailman/Archiver
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10094

Modified Files:
      Tag: Release_2_1-maint
        pipermail.py 
Log Message:
Fix pipermail.py bug for not retainning original date in .txt archive
if the archive was regenerated by 'arch --wipe'. Thanks SHIGENO san for
reporting bug and essential fix. Code was rewritten for simplicity.


Index: pipermail.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Archiver/pipermail.py,v
retrieving revision 2.22.2.5
retrieving revision 2.22.2.6
diff -u -d -r2.22.2.5 -r2.22.2.6
--- pipermail.py        25 Jan 2005 07:52:01 -0000      2.22.2.5
+++ pipermail.py        5 Feb 2005 07:56:47 -0000       2.22.2.6
@@ -7,7 +7,7 @@
 import re
 import sys
 import time
-from email.Utils import parseaddr, parsedate_tz, mktime_tz
+from email.Utils import parseaddr, parsedate_tz, mktime_tz, formatdate
 import cPickle as pickle
 from cStringIO import StringIO
 from string import lowercase
@@ -240,6 +240,9 @@
             date = self._last_article_time + 1
         self._last_article_time = date
         self.date = '%011i' % date
+        self.datestr = message.get('date') \
+                       or message.get('x-list-received-date') \
+                       or formatdate(date)
 
     def __repr__(self):
         return '<Article ID = '+repr(self.msgid)+'>'

_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to