Skip to content

Commit

Permalink
don't IMAP CLOSE the folder when passing-through exceptions
Browse files Browse the repository at this point in the history
..., otherwise IMAP server errors can get a bit weird.
  • Loading branch information
oxij committed May 11, 2024
1 parent ed18371 commit 4750a21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imaparms/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4750a21

Please sign in to comment.