From b287e91381b8853fff98bd4ebff289bf9640cbff Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 09:31:12 +0200 Subject: [PATCH] Modify help command of XML CLI tool (#5246) (#5249) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cferreiragonz (cherry picked from commit 37cd84da373a3790c602017838a0d2f432a89805) Co-authored-by: Carlos Ferreira González --- 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 e638256439c..d3ee753cb2a 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)