From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id CEDDC2C55 for ; Wed, 29 Mar 2017 08:56:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490770619; x=1522306619; h=message-id:date:from:mime-version:to:subject:references: in-reply-to:content-transfer-encoding; bh=qdVPt5w1g+1SusIU9K/4NcpFQMvL5Oan7+EwmCNqH7U=; b=sFW3J0vLMqCOGK5T5RAgOe6zlIhfQkXUrIJVIj52aGim7qHuZLmeW6i6 uoIB5B6nHCBHngeJPwNf6+QUh9XO1g==; Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2017 23:56:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,240,1486454400"; d="scan'208";a="241523647" Received: from stv-crb-56.sh.intel.com (HELO [10.239.128.116]) ([10.239.128.116]) by fmsmga004.fm.intel.com with ESMTP; 28 Mar 2017 23:56:57 -0700 Message-ID: <58DB5881.3060804@intel.com> Date: Wed, 29 Mar 2017 14:47:29 +0800 From: "Liu, Yong" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Lijuan Tu , dts@dpdk.org References: <1490666124-112244-1-git-send-email-lijuanx.a.tu@intel.com> In-Reply-To: <1490666124-112244-1-git-send-email-lijuanx.a.tu@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dts] [PATCH] nics/net_device: fix removeobj bug. X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 06:57:00 -0000 Thanks, Lijuan. Applied. On 03/28/2017 09:55 AM, Lijuan Tu wrote: > Remove all the match network device object, not only the first one. > > Signed-off-by: Lijuan Tu > --- > nics/net_device.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/nics/net_device.py b/nics/net_device.py > index ba3d9c2..0af4ad5 100644 > --- a/nics/net_device.py > +++ b/nics/net_device.py > @@ -885,7 +885,7 @@ def remove_from_list(host): > Remove network device object from global structure > Parameter will by host ip > """ > - for nic in NICS_LIST: > + for nic in NICS_LIST[:]: > if host == nic['host']: > NICS_LIST.remove(nic) >