mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-13 10:21:05 +01:00
Added better logging for case when IMAP folder may not exist when check IMAP messages, to address issue in #536
This commit is contained in:
parent
5846732ef1
commit
96cae9bdd5
@ -195,7 +195,10 @@ def process_queue(q, logger):
|
||||
settings.QUEUE_EMAIL_BOX_PASSWORD)
|
||||
server.select(q.email_box_imap_folder)
|
||||
|
||||
status, data = server.search(None, 'NOT', 'DELETED')
|
||||
try:
|
||||
status, data = server.search(None, 'NOT', 'DELETED')
|
||||
except imaplib.IMAP4.error:
|
||||
logger.error("IMAP retrieve failed. Is the folder '%s' spelled correctly, and does it exist on the server?" % q.email_box_imap_folder)
|
||||
if data:
|
||||
msgnums = data[0].split()
|
||||
logger.info("Received %d messages from IMAP server" % len(msgnums))
|
||||
|
Loading…
Reference in New Issue
Block a user