usertools: replace string.split

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>
This commit is contained in:
Stephen Hemminger 2020-11-03 22:48:36 -08:00 committed by Thomas Monjalon
parent 4c3a535ede
commit ecdd471171

View File

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