On Wed, Mar 18, 2015 at 05:56:22PM +0100, Hrvoje Ribicic wrote:
> Interdiff:
> 
> diff --git a/qa/qa_utils.py b/qa/qa_utils.py
> index b8ef546..c1a6d22 100644
> --- a/qa/qa_utils.py
> +++ b/qa/qa_utils.py
> @@ -206,11 +206,12 @@ def AssertCommand(cmd, fail=False, node=None,
> log_cmd=True, max_seconds=None):
>    rcode = popen.returncode
>    duration_seconds = TimedeltaToTotalSeconds(datetime.datetime.now() -
> start)
> 
> -  if fail is not None:
> -    _AssertRetCode(rcode, fail, cmdstr, nodename)
> -
> -  if log_cmd:
> -    _PrintCommandOutput(stdout, stderr)
> +  try:
> +    if fail is not None:
> +      _AssertRetCode(rcode, fail, cmdstr, nodename)
> +  finally:
> +    if log_cmd:
> +      _PrintCommandOutput(stdout, stderr)

LGTM

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores

Reply via email to