From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2BFBDA0535 for ; Wed, 12 Feb 2020 13:32:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0D2552BFA; Wed, 12 Feb 2020 13:32:13 +0100 (CET) Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id E00A41D9E; Wed, 12 Feb 2020 13:32:09 +0100 (CET) Received: from medusa.dev.6wind.com. (unknown [10.16.0.24]) by proxy.6wind.com (Postfix) with ESMTP id 8FE53381CAF; Wed, 12 Feb 2020 13:32:09 +0100 (CET) From: Thomas Faivre To: dev@dpdk.org Cc: Neil Horman , stable@dpdk.org Date: Wed, 12 Feb 2020 13:31:56 +0100 Message-Id: <20200212123156.20434-1-thomas.faivre@6wind.com> X-Mailer: git-send-email 2.23.0.tfa MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] usertools: fix syntax warning in python 3.8 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "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 --- 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