Excepted IMAP connection Error
This commit is contained in:
parent
0acb89ebf0
commit
9e221ed290
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,6 +5,7 @@ __pycache__/
|
||||||
last_mention
|
last_mention
|
||||||
last_mail
|
last_mail
|
||||||
ticketfrei.cfg
|
ticketfrei.cfg
|
||||||
|
ticketfrei.sqlite
|
||||||
seen_toots.pickle
|
seen_toots.pickle
|
||||||
seen_toots.pickle.part
|
seen_toots.pickle.part
|
||||||
pip-selfcheck.json
|
pip-selfcheck.json
|
||||||
|
|
|
@ -73,8 +73,11 @@ class Mailbot(object):
|
||||||
try:
|
try:
|
||||||
rv, data = self.mailbox.select("Inbox")
|
rv, data = self.mailbox.select("Inbox")
|
||||||
except imaplib.IMAP4.abort:
|
except imaplib.IMAP4.abort:
|
||||||
logger.error("Crawling Mail failed", exc_info=True)
|
rv = "Crawling Mail failed"
|
||||||
rv = False
|
logger.error(rv, exc_info=True)
|
||||||
|
except TimeoutError:
|
||||||
|
rv = "No Connection"
|
||||||
|
logger.error(rv, exc_info=True)
|
||||||
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