mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-09 22:38:19 +02:00
supress errors during close
This commit is contained in:
parent
fbaa378e59
commit
f91b4ee544
1 changed files with 6 additions and 2 deletions
|
|
@ -50,8 +50,12 @@ class ImapTransport(EmailTransport):
|
||||||
self.server.select()
|
self.server.select()
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
self.server.close()
|
try:
|
||||||
self.server.logout()
|
self.server.close()
|
||||||
|
self.server.logout()
|
||||||
|
except (imaplib.IMAP4.error, OSError) as e:
|
||||||
|
logger.warning(f'Failed to close IMAP connection, ignoring: {e}')
|
||||||
|
pass
|
||||||
|
|
||||||
def _get_all_message_ids(self):
|
def _get_all_message_ids(self):
|
||||||
# Fetch all the message uids
|
# Fetch all the message uids
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue