Skip to content

Commit

Permalink
fix tiny bugs
Browse files Browse the repository at this point in the history
- reset the value of `all_folders` when it's invalid
- fix value reference in EmitAction
  • Loading branch information
oxij committed Nov 13, 2023
1 parent dd7fe7a commit 59c090a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion imaparms/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 59c090a

Please sign in to comment.