From: Thomas Faivre Date: Wed, 12 Feb 2020 12:31:56 +0000 (+0100) Subject: usertools: fix syntax warning in python 3.8 X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=e1766e7b0c9b4ad30b330677f2376a05b3b46f0c usertools: fix syntax warning in python 3.8 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 --- diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py index 069a3bf124..9d5c6369a0 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