From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C9AAA04E7; Wed, 4 Nov 2020 08:04:54 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4DBB8C814; Wed, 4 Nov 2020 08:04:02 +0100 (CET) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by dpdk.org (Postfix) with ESMTP id 0016EC7FA for ; Wed, 4 Nov 2020 08:03:58 +0100 (CET) Received: by mail-pg1-f171.google.com with SMTP id g12so15777990pgm.8 for ; Tue, 03 Nov 2020 23:03:58 -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=0sQzGL8TcXmEvvxZ1HAAB61ZBOoIxCoHB2bG7Yk5dL0=; b=JYoRhvqg/dEc497leNf03dQYCe5MMxc4NLw43uOk7z8x63Ie2QFyEBe4BCLehuVljt FYlRIln3+VaQbfi1bkfMdSDqPdipG9Se/8BQ7/rVG7JofSmzp2zlGJ2LoJyphGH5JlhZ nHbWihD/aJmIBUHVsQ7v7/LXw8+ixGjB9MKw0MGeY5qi11rWWGzWQVw1ESYR5REU9HEj /kSXJath+p2ONJWPyAoLKPE1OJWNzBJlURpCBoi3cydfBJwheOPgh6WhhKe4i+MGYOMC EtFAmhTNNcgBhvzAL2/dNCe9RwcL6c+2dytVmBPubsYDc8vGD//K6qo9B6hdmrsabRr1 ZHUQ== 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=0sQzGL8TcXmEvvxZ1HAAB61ZBOoIxCoHB2bG7Yk5dL0=; b=bNHeg84PQ+Umj5l0hv6y7C5YqN1VWVMWogL6euuyAPlYPR/yqXGl5JujleiV3U7gef jEyvAu6vFap841q+t6IvPWIA/knL13egOEKuiTgzG5qDOmTP23GV6mgd3ZNWEqZtw5QY akQ4BP/5mmZFzmbYOs2gIBbyXo+nt+mWHlABf3khKKEaxZRmJSSZ8mmVV5Fr71/n3koB yxF3wCaxcdN+hh6mNSGxYpjUVyRgTOCYXIEw53UZP3t52Be+K38LaKm+1Gl7rXEuenb0 asujfBgpxBf3+bmHpJ2UcJHaRTrs3/LABDXv+xluGpSeOl2gvY8FHnlfAanLcf7p7/hW gjcA== X-Gm-Message-State: AOAM532k3shhDYh6cO0bUb6kIOfWY/B9r5zwYFNiRPF+OrVfjVu3Xdqx D0IgWOs3foM0EwzayeCSWBBOxM0YW35H/ybZ X-Google-Smtp-Source: ABdhPJwskW/OEIG7QOfXmyVJUSlhc4tC16pvrB2FEFTXltj7UWu5XgCA06gSiIBrpkDhVS5hnwqYlg== X-Received: by 2002:a63:9909:: with SMTP id d9mr19864071pge.360.1604473436748; Tue, 03 Nov 2020 23:03:56 -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 z21sm1181177pfa.158.2020.11.03.23.03.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Nov 2020 23:03:55 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Tue, 3 Nov 2020 23:03:47 -0800 Message-Id: <20201104070350.28224-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201104070350.28224-1-stephen@networkplumber.org> References: <20200906013133.26360-12-stephen@networkplumber.org> <20201104070350.28224-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 3/6] dpdk-devbind: fix python lint warnings for imports 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" Address python lint complaints about unused imports. Signed-off-by: Stephen Hemminger --- usertools/dpdk-devbind.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 3a27641d0e08..4148b66b6841 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -9,7 +9,7 @@ import argparse from glob import glob -from os.path import exists, abspath, dirname, basename +from os.path import exists, basename from os.path import join as path_join # The PCI base class for all devices @@ -342,7 +342,7 @@ def bind_one(dev_id, driver, force): # of unbinding those devices if driver in dpdk_drivers: filename = "/sys/bus/pci/devices/%s/driver_override" % dev_id - if os.path.exists(filename): + if exists(filename): try: f = open(filename, "w") except: @@ -405,7 +405,7 @@ def bind_one(dev_id, driver, force): # Before unbinding it, overwrite driver_override with empty string so that # the device can be bound to any other driver filename = "/sys/bus/pci/devices/%s/driver_override" % dev_id - if os.path.exists(filename): + if exists(filename): try: f = open(filename, "w") except: @@ -473,7 +473,7 @@ def bind_all(dev_list, driver, force=False): # that are not bound to any other driver could be bound even if no one has # asked them to. hence, we check the list of drivers again, and see if # some of the previously-unbound devices were erroneously bound. - if not os.path.exists("/sys/bus/pci/devices/%s/driver_override" % d): + if not exists("/sys/bus/pci/devices/%s/driver_override" % d): for d in devices.keys(): # skip devices that were already bound or that we know should be bound if "Driver_str" in devices[d] or d in dev_list: -- 2.27.0