From 4750a21e96aad1632e76c510ef8a48a04ea7a077 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Fri, 26 Apr 2024 12:00:00 +0000 Subject: [PATCH] don't IMAP `CLOSE` the folder when passing-through exceptions ..., otherwise IMAP server errors can get a bit weird. --- imaparms/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imaparms/__main__.py b/imaparms/__main__.py index af502b6..dd0c70d 100755 --- a/imaparms/__main__.py +++ b/imaparms/__main__.py @@ -753,8 +753,8 @@ def for_each_folder_(cfg : Namespace, state : State, account : Account, srv : IM func(cfg, state, account, srv, folder, *args) except FolderFailure as exc: account_error(account, str(exc)) - finally: - srv.close() + + srv.close() def do_folder_action(cfg : Namespace, state : State, account : Account, srv : IMAP4, folder : str, command : str) -> None: