Merge pull request #48 from b3yond/1.0

1.1
This commit is contained in:
b3yond 2018-10-07 19:24:50 +02:00 committed by GitHub
commit 7fb70cee57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 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

@ -70,7 +70,14 @@ class Mailbot(object):
crawl for new mails.
:return: msgs: (list of report.Report objects)
"""
rv, data = self.mailbox.select("Inbox")
try:
rv, data = self.mailbox.select("Inbox")
except imaplib.IMAP4.abort:
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")