patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Thomas Faivre <thomas.faivre@6wind.com>
To: dev@dpdk.org
Cc: Neil Horman <nhorman@tuxdriver.com>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH] usertools: fix syntax warning in python 3.8
Date: Wed, 12 Feb 2020 13:31:56 +0100	[thread overview]
Message-ID: <20200212123156.20434-1-thomas.faivre@6wind.com> (raw)

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


             reply	other threads:[~2020-02-12 12:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 12:31 Thomas Faivre [this message]
2020-02-16 21:13 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200212123156.20434-1-thomas.faivre@6wind.com \
    --to=thomas.faivre@6wind.com \
    --cc=dev@dpdk.org \
    --cc=nhorman@tuxdriver.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).