From c0328be3a479b38820923b4aed2847e7a2bc300f Mon Sep 17 00:00:00 2001
From: b3yond <b3yond@riseup.net>
Date: Fri, 19 Jan 2018 16:27:30 +0100
Subject: [PATCH 1/3] one \ to much lol

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index bbe781a..43a0426 100644
--- a/README.md
+++ b/README.md
@@ -74,7 +74,7 @@ feel free to use them as an orientation.
 
 Just add the words to the goodlist, which you want to require. A
 report is only spread, if it contains at least one of them. If you
-want to RT everything, just add a ```\*```.
+want to RT everything, just add a ```*```.
 
 There is also a blacklist, which you can use to automatically sort
 out malicious tweets. Be careful though, our filter can't read the

From 0acb89ebf044bfcd6098d10fce34e965221c2535 Mon Sep 17 00:00:00 2001
From: b3yond <b3yond@riseup.net>
Date: Tue, 23 Jan 2018 09:18:59 +0100
Subject: [PATCH 2/3] excepted IMAP4 error with unknown cause

---
 mailbot.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/mailbot.py b/mailbot.py
index a513359..d74e3b8 100644
--- a/mailbot.py
+++ b/mailbot.py
@@ -70,7 +70,11 @@ 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:
+            logger.error("Crawling Mail failed", exc_info=True)
+            rv = False
         msgs = []
         if rv == 'OK':
             rv, data = self.mailbox.search(None, "ALL")

From 9e221ed29047ece677d00a668becc8b970d634a2 Mon Sep 17 00:00:00 2001
From: b3yond <b3yond@riseup.net>
Date: Tue, 30 Jan 2018 16:09:29 +0100
Subject: [PATCH 3/3] Excepted IMAP connection Error

---
 .gitignore | 1 +
 mailbot.py | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 8b2b385..3ccf5f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@ __pycache__/
 last_mention
 last_mail
 ticketfrei.cfg
+ticketfrei.sqlite
 seen_toots.pickle
 seen_toots.pickle.part
 pip-selfcheck.json
diff --git a/mailbot.py b/mailbot.py
index d74e3b8..7ccc92e 100644
--- a/mailbot.py
+++ b/mailbot.py
@@ -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")