[Spambayes-checkins] spambayes imapfilter.py,1.24,1.25
Tony Meyer
anadelonbrin at users.sourceforge.net
Fri Apr 18 18:11:37 EDT 2003
Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv7328
Modified Files:
imapfilter.py
Log Message:
Fix for missing date header time retrieval function.
Index: imapfilter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/imapfilter.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** imapfilter.py 18 Apr 2003 23:13:23 -0000 1.24
--- imapfilter.py 19 Apr 2003 00:11:33 -0000 1.25
***************
*** 175,182 ****
# a timestamp for the message. If the message has a date header
# we use that. Otherwise, we use the current time.
! try:
return imaplib.Time2Internaldate(\
! time.mktime(parsedate(self["Date"])))
! except KeyError:
return imaplib.Time2Internaldate(time.time())
--- 175,183 ----
# a timestamp for the message. If the message has a date header
# we use that. Otherwise, we use the current time.
! message_date = self["Date"]
! if message_date is not None:
return imaplib.Time2Internaldate(\
! time.mktime(parsedate(message_date)))
! else:
return imaplib.Time2Internaldate(time.time())
More information about the Spambayes-checkins
mailing list