aboutsummaryrefslogtreecommitdiffstats
path: root/archivemail.py
diff options
context:
space:
mode:
Diffstat (limited to 'archivemail.py')
-rwxr-xr-xarchivemail.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/archivemail.py b/archivemail.py
index 8020e89..dd19e0d 100755
--- a/archivemail.py
+++ b/archivemail.py
@@ -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):