* [dpdk-stable] [PATCH] usertools/pmdinfo: fix plugin auto scan
@ 2021-10-19 12:52 David Marchand
2021-10-20 19:31 ` [dpdk-stable] [dpdk-dev] " Robin Jarry
0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2021-10-19 12:52 UTC (permalink / raw)
To: dev
Cc: stable, Neil Horman, Dmitry Kozlyuk, Stephen Hemminger, Bruce Richardson
Migration to argparse was incomplete.
$ dpdk-pmdinfo.py -p $(which dpdk-testpmd)
Traceback (most recent call last):
File "/usr/bin/dpdk-pmdinfo.py", line 626, in <module>
main()
File "/usr/bin/dpdk-pmdinfo.py", line 596, in main
exit(scan_for_autoload_pmds(args[0]))
TypeError: 'Namespace' object does not support indexing
Fixes: 81255f27c65c ("usertools: replace optparse with argparse")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
usertools/dpdk-pmdinfo.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py
index 3381aa616c..40ef5cec6c 100755
--- a/usertools/dpdk-pmdinfo.py
+++ b/usertools/dpdk-pmdinfo.py
@@ -593,7 +593,7 @@ def main(stream=None):
exit(1)
if args.pdir:
- exit(scan_for_autoload_pmds(args[0]))
+ exit(scan_for_autoload_pmds(args.elf_file))
ldlibpath = os.environ.get('LD_LIBRARY_PATH')
if ldlibpath is None:
--
2.23.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] usertools/pmdinfo: fix plugin auto scan
2021-10-19 12:52 [dpdk-stable] [PATCH] usertools/pmdinfo: fix plugin auto scan David Marchand
@ 2021-10-20 19:31 ` Robin Jarry
2021-10-25 15:10 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Robin Jarry @ 2021-10-20 19:31 UTC (permalink / raw)
To: David Marchand
Cc: dev, stable, Neil Horman, Dmitry Kozlyuk, Stephen Hemminger,
Bruce Richardson
Hello,
2021-10-19, David Marchand:
> Migration to argparse was incomplete.
>
> $ dpdk-pmdinfo.py -p $(which dpdk-testpmd)
> Traceback (most recent call last):
> File "/usr/bin/dpdk-pmdinfo.py", line 626, in <module>
> main()
> File "/usr/bin/dpdk-pmdinfo.py", line 596, in main
> exit(scan_for_autoload_pmds(args[0]))
> TypeError: 'Namespace' object does not support indexing
>
> Fixes: 81255f27c65c ("usertools: replace optparse with argparse")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
It is sad that pylint does not report an error:
https://pycodequ.al/docs/pylint-messages/e1136-unsubscriptable-object.html
Anyway, this fix looks good.
Reviewed-by: Robin Jarry <robin.jarry@6wind.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] usertools/pmdinfo: fix plugin auto scan
2021-10-20 19:31 ` [dpdk-stable] [dpdk-dev] " Robin Jarry
@ 2021-10-25 15:10 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2021-10-25 15:10 UTC (permalink / raw)
To: David Marchand
Cc: dev, stable, Neil Horman, Dmitry Kozlyuk, Stephen Hemminger,
Bruce Richardson, Robin Jarry
20/10/2021 21:31, Robin Jarry:
> Hello,
>
> 2021-10-19, David Marchand:
> > Migration to argparse was incomplete.
> >
> > $ dpdk-pmdinfo.py -p $(which dpdk-testpmd)
> > Traceback (most recent call last):
> > File "/usr/bin/dpdk-pmdinfo.py", line 626, in <module>
> > main()
> > File "/usr/bin/dpdk-pmdinfo.py", line 596, in main
> > exit(scan_for_autoload_pmds(args[0]))
> > TypeError: 'Namespace' object does not support indexing
> >
> > Fixes: 81255f27c65c ("usertools: replace optparse with argparse")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> It is sad that pylint does not report an error:
>
> https://pycodequ.al/docs/pylint-messages/e1136-unsubscriptable-object.html
>
> Anyway, this fix looks good.
>
> Reviewed-by: Robin Jarry <robin.jarry@6wind.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-25 15:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 12:52 [dpdk-stable] [PATCH] usertools/pmdinfo: fix plugin auto scan David Marchand
2021-10-20 19:31 ` [dpdk-stable] [dpdk-dev] " Robin Jarry
2021-10-25 15:10 ` Thomas Monjalon
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).