fix passing of mailbox object
This commit is contained in:
parent
7e6af36853
commit
6bdb802af8
@ -216,7 +216,7 @@ def process_mailbox(M):
|
|||||||
local_date.strftime("%a, %d %b %Y %H:%M:%S"))
|
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)')
|
rv, data = M.fetch(msg_index.encode('ascii'), '(RFC822)')
|
||||||
if rv != 'OK':
|
if rv != 'OK':
|
||||||
print("ERROR getting message", rv)
|
print("ERROR getting message", rv)
|
||||||
@ -235,7 +235,7 @@ def process_registrations(M):
|
|||||||
msgs = msgs[0].decode('ascii').split()
|
msgs = msgs[0].decode('ascii').split()
|
||||||
print("Found %i registration mails" % len(msgs))
|
print("Found %i registration mails" % len(msgs))
|
||||||
for msg_index in msgs:
|
for msg_index in msgs:
|
||||||
participations.append(process_message(msg_index))
|
participations.append(process_message(M, msg_index))
|
||||||
return participations
|
return participations
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user