From b8a931284d51365af2d14c1d7804cc8b7711b57f Mon Sep 17 00:00:00 2001 From: tkikuchi <> Date: Sat, 5 Feb 2005 07:56:47 +0000 Subject: 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. --- Mailman/Archiver/pipermail.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Mailman/Archiver/pipermail.py b/Mailman/Archiver/pipermail.py index 173c5980..fac7e5ed 100644 --- a/Mailman/Archiver/pipermail.py +++ b/Mailman/Archiver/pipermail.py @@ -7,7 +7,7 @@ import os 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 @@ class Article: 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 '
' -- cgit v1.2.3