LGTM, thanks.

On Tue, Feb 18, 2014 at 3:39 PM, Hrvoje Ribicic <[email protected]> wrote:

> The command logging performed by GetCommandOutput can be distracting
> and unwelcome. This patch adds a switch allowing the command output to
> be muted as needed.
>
> Signed-off-by: Hrvoje Ribicic <[email protected]>
> ---
>  qa/qa_utils.py | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/qa/qa_utils.py b/qa/qa_utils.py
> index a868566..5316b2e 100644
> --- a/qa/qa_utils.py
> +++ b/qa/qa_utils.py
> @@ -338,7 +338,7 @@ def CloseMultiplexers():
>      utils.RemoveFile(sname)
>
>
> -def GetCommandOutput(node, cmd, tty=None, use_multiplexer=True,
> +def GetCommandOutput(node, cmd, tty=None, use_multiplexer=True,
> log_cmd=True,
>                       fail=False):
>    """Returns the output of a command executed on the given node.
>
> @@ -351,13 +351,15 @@ def GetCommandOutput(node, cmd, tty=None,
> use_multiplexer=True,
>    @type use_multiplexer: bool
>    @param use_multiplexer: if the SSH multiplexer provided by the QA
> should be
>                            used or not
> +  @type log_cmd: bool
> +  @param log_cmd: if the command should be logged
>    @type fail: bool
>    @param fail: whether the command is expected to fail
>    """
>    assert cmd
>    p = StartLocalCommand(GetSSHCommand(node, cmd, tty=tty,
>                                        use_multiplexer=use_multiplexer),
> -                        stdout=subprocess.PIPE)
> +                        stdout=subprocess.PIPE, log_cmd=log_cmd)
>    rcode = p.wait()
>    _AssertRetCode(rcode, fail, cmd, node)
>    return p.stdout.read()
> --
> 1.9.0.rc1.175.g0b1dcb5
>
>

Reply via email to