Fix imaplib 'IMAP' module reference to 'IMAP4'

On IMAP login error: 'imaplib' has no 'IMAP' member; maybe 'IMAP4'
This commit is contained in:
Patrick Mithamo 2018-03-29 01:51:24 +03:00
parent fef08082de
commit d372e337c6

View File

@ -216,7 +216,7 @@ def process_queue(q, logger):
q.email_box_pass or q.email_box_pass or
settings.QUEUE_EMAIL_BOX_PASSWORD) settings.QUEUE_EMAIL_BOX_PASSWORD)
server.select(q.email_box_imap_folder) server.select(q.email_box_imap_folder)
except imaplib.IMAP.abort: except imaplib.IMAP4.abort:
logger.error("IMAP login failed. Check that the server is accessible and that the username and password are correct.") logger.error("IMAP login failed. Check that the server is accessible and that the username and password are correct.")
server.logout() server.logout()
sys.exit() sys.exit()