* [dpdk-dev] [PATCH] usertools: fix syntax warning in python 3.8
@ 2020-02-12 12:31 Thomas Faivre
2020-02-16 21:13 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Faivre @ 2020-02-12 12:31 UTC (permalink / raw)
To: dev; +Cc: Neil Horman, stable
Silent the following warning when running script with python 3.8:
> /usr/bin/dpdk-pmdinfo:542: SyntaxWarning: "is" with a literal.
> Did you mean "=="?
> if (autoload_path is None or autoload_path is ""):
As autoload_path can only be None or a string, directly check its bool
value.
Fixes: c67c9a5c646a ("tools: query binaries for HW and other support information")
Cc: stable@dpdk.org
Signed-off-by: Thomas Faivre <thomas.faivre@6wind.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 069a3bf124b2..9d5c6369a017 100755
--- a/usertools/dpdk-pmdinfo.py
+++ b/usertools/dpdk-pmdinfo.py
@@ -539,7 +539,7 @@ def scan_for_autoload_pmds(dpdk_path):
return
(autoload_path, scannedfile) = readelf.search_for_autoload_path()
- if (autoload_path is None or autoload_path is ""):
+ if not autoload_path:
if (raw_output is False):
print("No autoload path configured in %s" % dpdk_path)
return
--
2.23.0.tfa
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] usertools: fix syntax warning in python 3.8
2020-02-12 12:31 [dpdk-dev] [PATCH] usertools: fix syntax warning in python 3.8 Thomas Faivre
@ 2020-02-16 21:13 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2020-02-16 21:13 UTC (permalink / raw)
To: Thomas Faivre; +Cc: dev, Neil Horman, stable
12/02/2020 13:31, Thomas Faivre:
> Silent the following warning when running script with python 3.8:
>
> > /usr/bin/dpdk-pmdinfo:542: SyntaxWarning: "is" with a literal.
> > Did you mean "=="?
> > if (autoload_path is None or autoload_path is ""):
>
> As autoload_path can only be None or a string, directly check its bool
> value.
>
> Fixes: c67c9a5c646a ("tools: query binaries for HW and other support information")
> Cc: stable@dpdk.org
>
> Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-16 21:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12 12:31 [dpdk-dev] [PATCH] usertools: fix syntax warning in python 3.8 Thomas Faivre
2020-02-16 21:13 ` [dpdk-dev] [dpdk-stable] " 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).