From: Bruce Richardson <bruce.richardson@intel.com>
To: Robin Jarry <rjarry@redhat.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH] cmdline-gen: fix error when command list has empty lines
Date: Fri, 17 Nov 2023 11:22:38 +0000 [thread overview]
Message-ID: <ZVdM/vYlxh4TT5Fj@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20231116111812.296090-2-rjarry@redhat.com>
On Thu, Nov 16, 2023 at 12:18:13PM +0100, Robin Jarry wrote:
> Fix the following error when a command list file contains empty lines:
>
> Traceback (most recent call last):
> File "buildtools/dpdk-cmdline-gen.py", line 202, in <module>
> main()
> File "buildtools/dpdk-cmdline-gen.py", line 184, in main
> process_commands(args.infile, sys.stdout, None, args.context_name)
> File "buildtools/dpdk-cmdline-gen.py", line 141, in process_commands
> cmd_inst, h_out, c_out = process_command(lineno, tokens.strip().spl…
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^…
> File "buildtools/dpdk-cmdline-gen.py", line 36, in process_command
> if tokens[0].startswith("<"):
> ~~~~~~^^^
> IndexError: list index out of range
>
> Use shlex.split() to properly split each line arguments into tokens and
> strip comments.
>
> If there are no tokens, ignore the line.
>
> Fixes: 37666691e9ed ("buildtools: add a tool to generate cmdline boilerplate")
>
> Cc: Bruce Richardson <bruce.richardson@intel.com>
> Signed-off-by: Robin Jarry <rjarry@redhat.com>
> ---
LGTM, thanks.
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
next prev parent reply other threads:[~2023-11-17 11:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-16 11:18 Robin Jarry
2023-11-17 11:22 ` Bruce Richardson [this message]
2023-11-20 12:47 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZVdM/vYlxh4TT5Fj@bricha3-MOBL.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=rjarry@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).