hotfix for #456: patch calls to ticket_from_message

add logger arg where missing in get_email
This commit is contained in:
Jonathan Barratt 2016-11-29 00:39:14 +07:00
parent cac3267e82
commit 3cfa371199
No known key found for this signature in database
GPG Key ID: BCBF01FBE07879DD

View File

@ -172,7 +172,7 @@ def process_queue(q, logger):
logger.info("Processing message %s" % str(msgNum)) logger.info("Processing message %s" % str(msgNum))
full_message = "\n".join(server.retr(msgNum)[1]) full_message = "\n".join(server.retr(msgNum)[1])
ticket = ticket_from_message(message=full_message, queue=q) ticket = ticket_from_message(message=full_message, queue=q, logger=logger)
if ticket: if ticket:
server.dele(msgNum) server.dele(msgNum)
@ -211,7 +211,7 @@ def process_queue(q, logger):
for num in msgnums: for num in msgnums:
logger.info("Processing message %s" % str(num)) logger.info("Processing message %s" % str(num))
status, data = server.fetch(num, '(RFC822)') status, data = server.fetch(num, '(RFC822)')
ticket = ticket_from_message(message=data[0][1], queue=q) ticket = ticket_from_message(message=data[0][1], queue=q, logger=logger)
if ticket: if ticket:
server.store(num, '+FLAGS', '\\Deleted') server.store(num, '+FLAGS', '\\Deleted')
logger.info("Successfully processed message %s, deleted from IMAP server" % str(msgNum)) logger.info("Successfully processed message %s, deleted from IMAP server" % str(msgNum))