test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] nics/net_device: fix removeobj bug.
@ 2017-03-28  1:55 Lijuan Tu
  2017-03-29  6:47 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: Lijuan Tu @ 2017-03-28  1:55 UTC (permalink / raw)
  To: dts; +Cc: Lijuan Tu

Remove all the match network device object, not only the first one.

Signed-off-by: Lijuan Tu <lijuanx.a.tu@intel.com>
---
 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-29  6:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28  1:55 [dts] [PATCH] nics/net_device: fix removeobj bug Lijuan Tu
2017-03-29  6:47 ` Liu, Yong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).