[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lnst-developers
Subject:    Re: [patch lnst] NetTestCommand: fix requested json output check
From:       Ondrej Lichtner <olichtne () redhat ! com>
Date:       2016-08-22 13:30:02
Message-ID: 20160822133002.GA2460 () olichtne_rh ! localdomain
[Download RAW message or body]

On Mon, Aug 22, 2016 at 10:20:29AM +0200, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@mellanox.com>
> 
> Fixes: bc9c6296e43 ("cmd: allow to parse JSON stdout into dictionary")
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
> ---
>  lnst/Common/NetTestCommand.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lnst/Common/NetTestCommand.py b/lnst/Common/NetTestCommand.py
> index f91cc37..30aaabf 100644
> --- a/lnst/Common/NetTestCommand.py
> +++ b/lnst/Common/NetTestCommand.py
> @@ -407,7 +407,7 @@ class NetTestCommandExec(NetTestCommandGeneric):
>                  stdout, stderr = self.exec_from(self._command["from"],
>                                                  self._command["command"])
>              else:
> -                json = True if "json" in self._command else False
> +                json = True if "json" in self._command and self._command["json"] else False
>                  stdout, stderr = self.exec_cmd(self._command["command"], json=json)
>              res_data = {"stdout": stdout, "stderr": stderr}
>              self.set_pass(res_data)
> -- 
> 2.5.5
> 

ack
_______________________________________________
LNST-developers mailing list
lnst-developers@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/lnst-developers@lists.fedorahosted.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic