improve shutdown order

This commit is contained in:
holger krekel
2020-06-05 23:28:27 +02:00
parent 7a5759de4b
commit 04bdfa17f7
+4 -4
View File
@@ -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)