DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Robin Jarry <rjarry@redhat.com>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [PATCH] cmdline-gen: fix error when command list has empty lines
Date: Mon, 20 Nov 2023 13:47:52 +0100	[thread overview]
Message-ID: <23296006.6Emhk5qWAg@thomas> (raw)
In-Reply-To: <ZVdM/vYlxh4TT5Fj@bricha3-MOBL.ger.corp.intel.com>

17/11/2023 12:22, Bruce Richardson:
> 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>

Applied, thanks.




      reply	other threads:[~2023-11-20 12:48 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
2023-11-20 12:47   ` Thomas Monjalon [this message]

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=23296006.6Emhk5qWAg@thomas \
    --to=thomas@monjalon.net \
    --cc=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).