Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Commit

Permalink
Merge 5c1edf7 into 60e8990
Browse files Browse the repository at this point in the history
  • Loading branch information
syntonym committed Jan 14, 2019
2 parents 60e8990 + 5c1edf7 commit 19e7de2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/documents/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,11 @@ def _get_messages(self):
return r

def _connect(self):
self._connection = imaplib.IMAP4_SSL(self._host, self._port)
try:
self._connection = imaplib.IMAP4_SSL(self._host, self._port)
except OSError as e:
msg = "Problem connecting to {}: {}".format(self._host, e.strerror)
raise MailFetcherError(msg)

def _login(self):

Expand Down

0 comments on commit 19e7de2

Please sign in to comment.