Skip to content

Commit

Permalink
usertools: fix syntax warning in python 3.8
Browse files Browse the repository at this point in the history
[ upstream commit e1766e7 ]

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: c67c9a5 ("tools: query binaries for HW and other support information")

Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
  • Loading branch information
ThomasFaivre authored and kevintraynor committed Feb 19, 2020
1 parent 1f134a0 commit f9b3416
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usertools/dpdk-pmdinfo.py
Expand Up @@ -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
Expand Down

0 comments on commit f9b3416

Please sign in to comment.