Excepted IMAP connection Error

stable2
b3yond 2018-01-30 16:09:29 +01:00
parent 0acb89ebf0
commit 9e221ed290
2 changed files with 6 additions and 2 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@ __pycache__/
last_mention
last_mail
ticketfrei.cfg
ticketfrei.sqlite
seen_toots.pickle
seen_toots.pickle.part
pip-selfcheck.json

View File

@ -73,8 +73,11 @@ class Mailbot(object):
try:
rv, data = self.mailbox.select("Inbox")
except imaplib.IMAP4.abort:
logger.error("Crawling Mail failed", exc_info=True)
rv = False
rv = "Crawling Mail failed"
logger.error(rv, exc_info=True)
except TimeoutError:
rv = "No Connection"
logger.error(rv, exc_info=True)
msgs = []
if rv == 'OK':
rv, data = self.mailbox.search(None, "ALL")