[dpdk-stable] patch 'usertools: fix syntax warning in python 3.8' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Feb 17 18:45:45 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From 7262d69b854be94e0bf30caa615be147bc7e4108 Mon Sep 17 00:00:00 2001
From: Thomas Faivre <thomas.faivre at 6wind.com>
Date: Wed, 12 Feb 2020 13:31:56 +0100
Subject: [PATCH] usertools: fix syntax warning in python 3.8

[ upstream commit e1766e7b0c9b4ad30b330677f2376a05b3b46f0c ]

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")

Signed-off-by: Thomas Faivre <thomas.faivre at 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 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
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-17 17:00:16.779871532 +0000
+++ 0053-usertools-fix-syntax-warning-in-python-3.8.patch	2020-02-17 17:00:15.379951475 +0000
@@ -1,8 +1,10 @@
-From e1766e7b0c9b4ad30b330677f2376a05b3b46f0c Mon Sep 17 00:00:00 2001
+From 7262d69b854be94e0bf30caa615be147bc7e4108 Mon Sep 17 00:00:00 2001
 From: Thomas Faivre <thomas.faivre at 6wind.com>
 Date: Wed, 12 Feb 2020 13:31:56 +0100
 Subject: [PATCH] usertools: fix syntax warning in python 3.8
 
+[ upstream commit e1766e7b0c9b4ad30b330677f2376a05b3b46f0c ]
+
 Silent the following warning when running script with python 3.8:
 
 > /usr/bin/dpdk-pmdinfo:542: SyntaxWarning: "is" with a literal.
@@ -13,7 +15,6 @@
 value.
 
 Fixes: c67c9a5c646a ("tools: query binaries for HW and other support information")
-Cc: stable at dpdk.org
 
 Signed-off-by: Thomas Faivre <thomas.faivre at 6wind.com>
 ---


More information about the stable mailing list