From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v1] dpdk-devbind.py: Virtio interface issue. Date: Thu, 25 Aug 2016 17:37:29 -0700 Message-ID: <20160825173729.1d73154e@xeon-e3> References: <20160825022546.96468-1-sodey@sonusnet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: , To: souvikdey33 Return-path: Received: from mail-pf0-f170.google.com (mail-pf0-f170.google.com [209.85.192.170]) by dpdk.org (Postfix) with ESMTP id 4A5855681 for ; Fri, 26 Aug 2016 02:37:17 +0200 (CEST) Received: by mail-pf0-f170.google.com with SMTP id y134so22554105pfg.0 for ; Thu, 25 Aug 2016 17:37:17 -0700 (PDT) In-Reply-To: <20160825022546.96468-1-sodey@sonusnet.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, 24 Aug 2016 22:25:46 -0400 souvikdey33 wrote: > + #The path for virtio devices are different. Get the correct path. > + virtio = "/sys/bus/pci/devices/%s/" % dev_id > + cmd = " ls %s | grep 'virt' " %virtio > + virtio = commands.getoutput(cmd) I am not a python export but in general it is better to use native language facilities likes os.listdir() rather than using shell pipes.