mirror of
https://github.com/chatmail/core.git
synced 2026-04-06 07:32:12 +03:00
improve shutdown order
This commit is contained in:
@@ -25,14 +25,14 @@ class ImapConn:
|
||||
self.select_folder("INBOX")
|
||||
|
||||
def shutdown(self):
|
||||
try:
|
||||
self.connection.close()
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
self.connection.logout()
|
||||
except Exception:
|
||||
print("Could not logout direct_imap conn")
|
||||
try:
|
||||
self.connection.close()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def select_folder(self, foldername):
|
||||
status, messages = self.connection.select(foldername)
|
||||
|
||||
Reference in New Issue
Block a user