Previously, we required the -s flag for 'pwclient update'. But since we
allow updating up to 2 different fields ('archived' and 'state'), drop
the required flag, and just enforce that the user must provide -a, -s,
or both.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
)
update_parser.add_argument(
'-s', metavar='STATE',
- required=True,
help='''Set patch state (e.g., 'Accepted', 'Superseded' etc.)'''
)
update_parser.add_argument(
sys.exit(1)
commit_str = args.get('c')
+ if state_str is None and archived_str is None and action == 'update':
+ update_parser.error('Must specify one or more update options (-a or -s)')
+
if args.get('n') != None:
try:
filt.add("max_count", args.get('n'))