diff mbox series

[02/11] dpdk-pmdinfo: replace string.split with split

Message ID 20200906013133.26360-3-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series Python script updates | expand


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Sept. 6, 2020, 1:31 a.m. UTC
In python3 the standard way to split strings is to use the
split() on the string object itself. The old way is broken
and would cause a traceback.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 usertools/dpdk-pmdinfo.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series


diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py
index 16619827911a..7576a3313f36 100755
--- a/usertools/dpdk-pmdinfo.py
+++ b/usertools/dpdk-pmdinfo.py
@@ -11,7 +11,6 @@ 
 import io
 import os
 import platform
-import string
 import sys
 from elftools.common.exceptions import ELFError
 from elftools.common.py3compat import byte2int
@@ -229,7 +228,7 @@  def loadLocal(self):
 def search_file(filename, search_path):
     """ Given a search path, find file with requested name """
-    for path in string.split(search_path, ":"):
+    for path in search_path.split(':'):
         candidate = os.path.join(path, filename)
         if os.path.exists(candidate):
             return os.path.abspath(candidate)