From 6bdb802af8eb050ddb6629f93eecf07fd03fccef Mon Sep 17 00:00:00 2001 From: Jan Grewe Date: Wed, 21 Aug 2019 23:48:34 +0200 Subject: [PATCH] fix passing of mailbox object --- email_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/email_client.py b/email_client.py index d0e6bae..2ce57fb 100644 --- a/email_client.py +++ b/email_client.py @@ -216,7 +216,7 @@ def process_mailbox(M): local_date.strftime("%a, %d %b %Y %H:%M:%S")) -def process_message(msg_index): +def process_message(M, msg_index): rv, data = M.fetch(msg_index.encode('ascii'), '(RFC822)') if rv != 'OK': print("ERROR getting message", rv) @@ -235,7 +235,7 @@ def process_registrations(M): msgs = msgs[0].decode('ascii').split() print("Found %i registration mails" % len(msgs)) for msg_index in msgs: - participations.append(process_message(msg_index)) + participations.append(process_message(M, msg_index)) return participations