On Wed, Sep 16, 2009 at 03:55:45PM +0200, Michael Hanselmann wrote:
> 
> It's redundant with RpcResult.fail_msg. This change survived QA, burnin and
> unittests.
> ---
>  lib/cmdlib.py |    4 ++--
>  lib/rpc.py    |   14 +++-----------
>  2 files changed, 5 insertions(+), 13 deletions(-)
> 
> diff --git a/lib/cmdlib.py b/lib/cmdlib.py
> index e99d2de..8d743fc 100644
> --- a/lib/cmdlib.py
> +++ b/lib/cmdlib.py
> @@ -1601,7 +1601,7 @@ class LURepairDiskSizes(NoHooksLU):
>      changed = []
>      for node, dskl in per_node_disks.items():
>        result = self.rpc.call_blockdev_getsizes(node, [v[2] for v in dskl])
> -      if result.failed or result.fail_msg:
> +      if result.RemoteFailMsg():

why not leave it like result.fail_msg?

>          self.LogWarning("Failure in blockdev_getsizes call to node"
>                          " %s, ignoring", node)
>          continue
> @@ -4037,7 +4037,7 @@ class LUQueryInstances(NoHooksLU):
>          if result.offline:
>            # offline nodes will be in both lists
>            off_nodes.append(name)
> -        if result.failed or result.fail_msg:
> +        if result.RemoteFailMsg():

same here.

Otherwise LGTM.

iustin

Reply via email to