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