Fix dealing with dates that don't have a timezone. For now, just skip them
This commit is contained in:
parent
b4c690aeb3
commit
854b090145
@ -122,7 +122,10 @@ class MailCrawler(object):
|
|||||||
print('DDB Processed message. Message date: {} Old date: {}'.format(
|
print('DDB Processed message. Message date: {} Old date: {}'.format(
|
||||||
message_date, since_date
|
message_date, since_date
|
||||||
))
|
))
|
||||||
|
try:
|
||||||
since_date = max(since_date, message_date)
|
since_date = max(since_date, message_date)
|
||||||
|
except TypeError:
|
||||||
|
print("Error comparing dates. We'll just use the last one")
|
||||||
print('DDB Since date is now ', since_date)
|
print('DDB Since date is now ', since_date)
|
||||||
last_message = max(uid, last_message)
|
last_message = max(uid, last_message)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user