excepted IMAP4 error with unknown cause
This commit is contained in:
parent
c0328be3a4
commit
0acb89ebf0
|
@ -70,7 +70,11 @@ class Mailbot(object):
|
||||||
crawl for new mails.
|
crawl for new mails.
|
||||||
:return: msgs: (list of report.Report objects)
|
:return: msgs: (list of report.Report objects)
|
||||||
"""
|
"""
|
||||||
rv, data = self.mailbox.select("Inbox")
|
try:
|
||||||
|
rv, data = self.mailbox.select("Inbox")
|
||||||
|
except imaplib.IMAP4.abort:
|
||||||
|
logger.error("Crawling Mail failed", exc_info=True)
|
||||||
|
rv = False
|
||||||
msgs = []
|
msgs = []
|
||||||
if rv == 'OK':
|
if rv == 'OK':
|
||||||
rv, data = self.mailbox.search(None, "ALL")
|
rv, data = self.mailbox.search(None, "ALL")
|
||||||
|
|
Loading…
Reference in a new issue