From 59c090aa260fe933279b77032a196045f83c0f93 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Mon, 13 Nov 2023 12:00:00 +0000 Subject: [PATCH] fix tiny bugs - reset the value of `all_folders` when it's invalid - fix value reference in EmitAction --- imaparms/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imaparms/__main__.py b/imaparms/__main__.py index fcd31c7..eca4a88 100755 --- a/imaparms/__main__.py +++ b/imaparms/__main__.py @@ -486,6 +486,7 @@ def do_action(args : _t.Any, srv : IMAP4, search_filter : str) -> None: if args.all_folders and len(args.folders) == 0: folders = get_folders(srv) else: + args.all_folders = False folders = args.folders for folder in filter(lambda f: f not in args.not_folders, folders): @@ -929,7 +930,7 @@ def __call__(self, parser : _t.Any, cfg : _t.Any, value : _t.Any, option_string password = p.stdout.readline().decode(defenc) # type: ignore retcode = p.wait() if retcode != 0: - die(_("`--passcmd` (`%s`) failed with non-zero exit code %d") % (args.passcmd, retcode)) + die(_("`--passcmd` (`%s`) failed with non-zero exit code %d") % (value, retcode)) else: assert False