summaryrefslogtreecommitdiff
path: root/tools/patman/control.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-05 21:41:53 -0600
committerSimon Glass <sjg@chromium.org>2020-07-24 19:25:15 -0600
commitfda1e372d35dc956317923f5057c3ac83be7f571 (patch)
treec019d16ce2ec2346ccf55d80b50304f5ae396f21 /tools/patman/control.py
parent137947e05b25a9e511bbc30bd795c9d95deec0cb (diff)
patman: Convert to ArgumentParser
Convert from OptionParser to ArgumentParser to match binman. With this we can easily add sub-commands. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/control.py')
-rw-r--r--tools/patman/control.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/patman/control.py b/tools/patman/control.py
index b481ff6b27..e67867b845 100644
--- a/tools/patman/control.py
+++ b/tools/patman/control.py
@@ -152,24 +152,24 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go,
os.remove(cc_file)
-def send(options):
+def send(args):
"""Create, check and send patches by email
Args:
- options (optparse.Values): Arguments to patman
+ args (argparse.Namespace): Arguments to patman
"""
setup()
col = terminal.Color()
series, cover_fname, patch_files = prepare_patches(
- col, options.branch, options.count, options.start, options.end,
- options.ignore_binary)
- ok = check_patches(series, patch_files, options.check_patch,
- options.verbose)
+ col, args.branch, args.count, args.start, args.end,
+ args.ignore_binary)
+ ok = check_patches(series, patch_files, args.check_patch,
+ args.verbose)
- its_a_go = ok or options.ignore_errors
+ its_a_go = ok or args.ignore_errors
if its_a_go:
email_patches(
- col, series, cover_fname, patch_files, options.process_tags,
- its_a_go, options.ignore_bad_tags, options.add_maintainers,
- options.limit, options.dry_run, options.in_reply_to, options.thread,
- options.smtp_server)
+ col, series, cover_fname, patch_files, args.process_tags,
+ its_a_go, args.ignore_bad_tags, args.add_maintainers,
+ args.limit, args.dry_run, args.in_reply_to, args.thread,
+ args.smtp_server)