[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH rhel6-branch] iscsi: fix listing of active nodes of a target (#752066)



ack

----- Original Message -----
> If the target is not among discovered, return [] instead of
> all discovered nodes for all targets (else: branch)
> 
> Related: rhbz#752066
> ---
>  storage/iscsi.py |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/storage/iscsi.py b/storage/iscsi.py
> index a4bbf46..d44b822 100644
> --- a/storage/iscsi.py
> +++ b/storage/iscsi.py
> @@ -133,9 +133,9 @@ class iscsi(object):
>  
>      def active_nodes(self, target=None):
>          """Nodes logged in to"""
> -        if target and target in self.discovered_targets:
> +        if target:
>              return [node for (node, logged_in) in
> -                    self.discovered_targets[target]
> +                    self.discovered_targets.get(target, [])
>                      if logged_in]
>          else:
>              return [node for (node, logged_in) in
> --
> 1.7.4
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list redhat com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list
> 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]