# If we have a command, it is safe to parse all arguments
if args.cmd:
args = parser.parse_args(argv)
- else:
+ elif not args.full_help:
# No command, so insert it after the known arguments and before the ones
# that presumably relate to the 'send' subcommand
nargs = len(rest)
def do_patman(args):
+ """Process a patman command
+
+ Args:
+ args (Namespace): Arguments to process
+ """
+ if args.full_help:
+ with resources.path('patman', 'README.rst') as readme:
+ tools.print_full_help(str(readme))
+ return 0
if args.cmd == 'send':
# Called from git with a patch filename as argument
# Printout a list of additional CC recipients for this patch
cca = cca.strip()
if cca:
print(cca)
-
- elif args.full_help:
- with resources.path('patman', 'README.rst') as readme:
- tools.print_full_help(str(readme))
else:
# If we are not processing tags, no need to warning about bad ones
if not args.process_tags:
args.ignore_bad_tags = True
do_send(args)
+ return 0
ret_code = 0
try: