[ mailman-Patches-672714 ] cope with garbage Date
SourceForge.net
noreply at sourceforge.net
Wed Jan 22 12:51:15 EST 2003
Patches item #672714, was opened at 2003-01-22 20:51
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=672714&group_id=103
Category: None
Group: Mailman 2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Donn Cave (donnc)
Assigned to: Nobody/Anonymous (nobody)
Summary: cope with garbage Date
Initial Comment:
rfc822.parsedate(garbage) -> None
This patch allows archive generation to survive a garbage Date
value. It recognizes the None return and does what it would
have done if Date had been missing.
*** Mailman/Archiver/pipermail.py.dist Sat Dec 7 18:21:58
2002
--- Mailman/Archiver/pipermail.py Wed Jan 15 15:58:31
2003
***************
*** 223,228 ****
--- 223,230 ----
if datestr is missing:
return None
date = parsedate_tz(datestr)
+ if date is None:
+ return None
try:
return time.mktime(date[:9])
except (ValueError, OverflowError):
*** Mailman/Handlers/Scrubber.py.dist Fri Dec 20 11:55:43
2002
--- Mailman/Handlers/Scrubber.py Wed Jan 15 16:00:31
2003
***************
*** 73,78 ****
--- 73,80 ----
def safe_strftime(fmt, floatsecs):
+ if floatsecs is None:
+ return None
try:
return time.strftime(fmt, floatsecs)
except ValueError:
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=672714&group_id=103
More information about the Mailman-coders
mailing list