aboutsummaryrefslogtreecommitdiffstats
path: root/python/download_emails.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/download_emails.py')
-rw-r--r--python/download_emails.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/download_emails.py b/python/download_emails.py
index 9072f4ec..cf738e9e 100644
--- a/python/download_emails.py
+++ b/python/download_emails.py
@@ -43,11 +43,12 @@ def save_emails(update=True):
existing_msgs = set(str(x).split("_")[1] for x in p.iterdir() if x.is_file())
last_history_id = None
- for msg in GmailMessage.list_msg_ids('swaptions', last_history_id):
+ gm = GmailMessage()
+ for msg in gm.list_msg_ids('swaptions', last_history_id):
if msg['id'] in existing_msgs:
continue
try:
- message = GmailMessage.from_id(msg['id'])
+ message = gm.from_id(msg['id'])
logging.info(message.history_id)
subject = message['subject']
date = parsedate_to_datetime(message['date'])