From d372e337c6edd826b36ade7c2c43440688df5619 Mon Sep 17 00:00:00 2001 From: Patrick Mithamo Date: Thu, 29 Mar 2018 01:51:24 +0300 Subject: [PATCH] Fix imaplib 'IMAP' module reference to 'IMAP4' On IMAP login error: 'imaplib' has no 'IMAP' member; maybe 'IMAP4' --- helpdesk/management/commands/get_email.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpdesk/management/commands/get_email.py b/helpdesk/management/commands/get_email.py index 65eea45b..f9fb7392 100755 --- a/helpdesk/management/commands/get_email.py +++ b/helpdesk/management/commands/get_email.py @@ -216,7 +216,7 @@ def process_queue(q, logger): q.email_box_pass or settings.QUEUE_EMAIL_BOX_PASSWORD) 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.") server.logout() sys.exit()