From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 9397E1094 for ; Tue, 28 Mar 2017 03:54:01 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP; 27 Mar 2017 18:54:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,234,1486454400"; d="scan'208";a="65771205" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by orsmga002.jf.intel.com with ESMTP; 27 Mar 2017 18:53:59 -0700 From: Lijuan Tu To: dts@dpdk.org Cc: Lijuan Tu Date: Tue, 28 Mar 2017 09:55:24 +0800 Message-Id: <1490666124-112244-1-git-send-email-lijuanx.a.tu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [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: Tue, 28 Mar 2017 01:54:02 -0000 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) -- 1.9.3