[dts] [PATCH] nics/net_device: fix removeobj bug.
Lijuan Tu
lijuanx.a.tu at intel.com
Tue Mar 28 03:55:24 CEST 2017
Remove all the match network device object, not only the first one.
Signed-off-by: Lijuan Tu <lijuanx.a.tu at 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
More information about the dts
mailing list