From 04bdfa17f7285bb984533121f227256e29600086 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Fri, 5 Jun 2020 22:27:11 +0200 Subject: [PATCH] improve shutdown order --- python/src/deltachat/direct_imap.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/src/deltachat/direct_imap.py b/python/src/deltachat/direct_imap.py index a7561a40c..37da51413 100644 --- a/python/src/deltachat/direct_imap.py +++ b/python/src/deltachat/direct_imap.py @@ -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)