From patchwork Wed Nov 4 06:48:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 83642 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 05DA8A0521; Wed, 4 Nov 2020 07:49:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D897ABE9F; Wed, 4 Nov 2020 07:48:57 +0100 (CET) Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id F0536BE7B for ; Wed, 4 Nov 2020 07:48:53 +0100 (CET) Received: by mail-pf1-f195.google.com with SMTP id w65so16512097pfd.3 for ; Tue, 03 Nov 2020 22:48:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+I97ORinggSpAxlykndpMsIbCkjHdqnrrc4mcPDuiiI=; b=VfnSw5HYelIczuoDv7Lk0mD6OOdCf1iKsGBXL8YmON0s15Wz55fnAhFFTbCNH/0r6K c2nWi/+YbyOdo71nby7ChdbaszSN755o/uELSoEU/gu1o2SX4AKkwVXm4tL+SVfKaafo A2vfbg2McoVoYBKBg0loe6mcCnsMDrtGHyBzQlVRRV3UPdC48+wiHuTLxzowkZbHvy+f n6AfvdEobm0KfK7CJsYAALFg8PI8waWX9qz3PN750yXv3huNHJDhIvjzl1egzHA5SB1U 34mS1A7lSbnzrx8vSN8QjjaW2yYYbo2vNeyCSsAV2tMN6L88jGy0zdeOBMHCjOkV23rs svqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+I97ORinggSpAxlykndpMsIbCkjHdqnrrc4mcPDuiiI=; b=o46RFX3q9G5uLw0gqV7G5EnIYEnq/+HSHLSffWPvDdTbT6LlOzFHedAciV280oV4TA /7Fi6HfesCmHiLvounkRcJx2XJNrgC12rKa2KgppP77gDZY4LJGo6SaXyIV40/xmN/l5 fKJiTCnVyEPndUm/OXIPxUXGvyGX0l3nM/tAnXsutwlWzR6sV/UkHgyRK12uReskZJ70 0R7MGc5BNCbcgSIOPiAzs6CTkKtUwGjom5MM4/OkZwageCp27/fx7U40ezjSXWN9rlHh M+zUh94Chz/FP7CGLj42L8sOmtiRiVTdrZ/vVdVVnhAKV13gyczxLnaQSBHUTfDjfoZR mZag== X-Gm-Message-State: AOAM530Rtwc1Cbh9APragUe9Gze0yynulABCzPGr76hozN6qsHELNdc2 Tc5stn0PJNHvXBtLoirnu6StwIV4HEl1tGVz X-Google-Smtp-Source: ABdhPJx7/xj50N0rmfB9YL3kR+txISlLdPjzPZGBp+IJt+fdww0XDurT5pVRLpEgv6IraE2izA7QHQ== X-Received: by 2002:a63:e449:: with SMTP id i9mr12310318pgk.438.1604472532106; Tue, 03 Nov 2020 22:48:52 -0800 (PST) Received: from hermes.corp.microsoft.com (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id c12sm1144137pgi.14.2020.11.03.22.48.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 22:48:51 -0800 (PST) From: Stephen Hemminger To: nhorman@tuxdriver.com Cc: dev@dpdk.org, Stephen Hemminger Date: Tue, 3 Nov 2020 22:48:36 -0800 Message-Id: <20201104064842.25832-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201104064842.25832-1-stephen@networkplumber.org> References: <20200906013133.26360-3-stephen@networkplumber.org> <20201104064842.25832-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 1/7] dpdk-pmdinfo: replace string.split with split X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- usertools/dpdk-pmdinfo.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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)