From 37cd84da373a3790c602017838a0d2f432a89805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Ferreira=20Gonz=C3=A1lez?= Date: Fri, 20 Sep 2024 08:45:36 +0200 Subject: [PATCH] Modify help command of XML CLI tool (#5246) Signed-off-by: cferreiragonz --- tools/fastdds/xml_ci/parser.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/fastdds/xml_ci/parser.py b/tools/fastdds/xml_ci/parser.py index f295073e761..df6a8d1c635 100644 --- a/tools/fastdds/xml_ci/parser.py +++ b/tools/fastdds/xml_ci/parser.py @@ -61,7 +61,7 @@ def __init__(self, argv): usage='fastdds xml []', ) parser.add_argument( - 'xml_command', + 'validate', nargs='*', help='validate XML profiles files using an XSD schema' ) @@ -88,13 +88,13 @@ def __init__(self, argv): except TypeError: args.xsd_file = self.xsd_dir() # get default schema path - if args.xml_command: - if args.xml_command[0] == 'validate': - args.xml_command.pop(0) - if not Validate(args.xsd_file).run(args.xml_command): + if args.validate: + if args.validate[0] == 'validate': + args.validate.pop(0) + if not Validate(args.xsd_file).run(args.validate): exit(1) else: - print(f'xml-command "{args.xml_command[0]}" is not valid') + print(f'xml-command "{args.validate[0]}" is not valid') else: parser.print_help() exit(1)