[dts] [PATCH] nics/net_device: fix removeobj bug.

Liu, Yong yong.liu at intel.com
Wed Mar 29 08:47:29 CEST 2017


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 <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)
>   



More information about the dts mailing list