[ mailman-Patches-672714 ] cope with garbage Date
SourceForge.net
noreply at sourceforge.net
Tue Mar 11 02:38:46 EST 2003
Patches item #672714, was opened at 2003-01-22 21: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: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Donn Cave (donnc)
>Assigned to: Thomas Wouters (twouters)
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:
----------------------------------------------------------------------
>Comment By: Thomas Wouters (twouters)
Date: 2003-03-11 11:38
Message:
Logged In: YES
user_id=34209
This has already been fixed by making the except block
following the offending pieces of code also catch
'TypeError'. But thanks for the patch :-)
----------------------------------------------------------------------
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