mirror of
https://git.code.sf.net/p/archivemail/code
synced 2025-03-11 23:32:48 +00:00
Fixed a bug where archivemail would abort if it got a date header
with a completely blank value.
This commit is contained in:
parent
e4adb7b222
commit
7c8b58dea3
6 changed files with 27 additions and 8 deletions
|
@ -1,4 +1,8 @@
|
|||
|
||||
Version 0.4.7 - ???
|
||||
* Fixed a bug where archivemail would abort if it received a date header
|
||||
with a completely blank value.
|
||||
|
||||
Version 0.4.6 - 6 May 2002
|
||||
* Fixed a bug where the os.rename() calls could fail if we were moving
|
||||
temporary files across different filesystems/partitions.
|
||||
|
|
8
Makefile
8
Makefile
|
@ -1,5 +1,5 @@
|
|||
|
||||
VERSION=0.4.6
|
||||
VERSION=0.4.7
|
||||
VERSION_TAG=v$(subst .,_,$(VERSION))
|
||||
TARFILE=archivemail-$(VERSION).tar.gz
|
||||
|
||||
|
@ -21,6 +21,12 @@ sdist: clobber doc
|
|||
cp archivemail.py archivemail
|
||||
fakeroot python setup.py sdist
|
||||
rm archivemail
|
||||
|
||||
bdist_rpm: clobber doc
|
||||
cp archivemail.py archivemail
|
||||
fakeroot python setup.py bdist_rpm
|
||||
rm archivemail
|
||||
|
||||
tag:
|
||||
cvs tag -F current
|
||||
cvs tag -F $(VERSION_TAG)
|
||||
|
|
2
TODO
2
TODO
|
@ -1,5 +1,5 @@
|
|||
|
||||
Goals for next minor release (0.4.7):
|
||||
Goals for next minor release (0.4.8):
|
||||
-------------------------------------
|
||||
* Think about the best way to specify the names of archives created with
|
||||
possibly an --archive-name option.
|
||||
|
|
|
@ -22,7 +22,7 @@ Website: http://archivemail.sourceforge.net/
|
|||
"""
|
||||
|
||||
# global administrivia
|
||||
__version__ = "archivemail v0.4.6"
|
||||
__version__ = "archivemail v0.4.7"
|
||||
__cvs_id__ = "$Id$"
|
||||
__copyright__ = """Copyright (C) 2002 Paul Rodger <paul@paulrodger.com>
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
|
@ -670,14 +670,14 @@ def guess_delivery_time(message):
|
|||
# try to guess the delivery date from various headers
|
||||
# get more desparate as we go through the array
|
||||
for header in ('Delivery-date', 'Date', 'Resent-Date'):
|
||||
date = message.getdate(header)
|
||||
if date:
|
||||
try:
|
||||
try:
|
||||
date = message.getdate(header)
|
||||
if date:
|
||||
time_message = time.mktime(date)
|
||||
assert(time_message)
|
||||
vprint("using valid time found from '%s' header" % header)
|
||||
return time_message
|
||||
except (ValueError, OverflowError): pass
|
||||
except (IndexError, ValueError, OverflowError): pass
|
||||
# as a second-last resort, try the date from the 'From_' line (ugly)
|
||||
# this will only work from a mbox-format mailbox
|
||||
if (message.unixfrom):
|
||||
|
|
2
setup.py
2
setup.py
|
@ -19,7 +19,7 @@ check_python_version() # define & run this early - 'distutils.core' is new
|
|||
from distutils.core import setup
|
||||
|
||||
setup(name="archivemail",
|
||||
version="0.4.6",
|
||||
version="0.4.7",
|
||||
description="archive and compress old email",
|
||||
license="GNU GPL",
|
||||
url="http://archivemail.sourceforge.net/",
|
||||
|
|
|
@ -563,6 +563,15 @@ This is after the ^From line"""
|
|||
'Date' : None,
|
||||
'Resent-Date' : 'Fri, 28 Jul 2000 16:11:36 +1000',
|
||||
},
|
||||
{ # completely blank dates were crashing < version 0.4.7
|
||||
'From_' : 'sender@dummy.domain Fri Jul 28 16:11:36 2000',
|
||||
'Date' : '',
|
||||
},
|
||||
{ # completely blank dates were crashing < version 0.4.7
|
||||
'From_' : 'sender@dummy.domain Fri Jul 28 16:11:36 2000',
|
||||
'Date' : '',
|
||||
'Resent-Date' : '',
|
||||
},
|
||||
)
|
||||
for headers in weird_headers:
|
||||
self.setUp()
|
||||
|
|
Loading…
Add table
Reference in a new issue