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)