On Wed, May 14, 2014 at 02:57:28PM +0100, Lars Wirzenius wrote:
On Wed, May 14, 2014 at 01:52:17PM +0100, Richard Ipsum wrote:
> - return self._app.runcmd(real_argv, **kwargs)
> + if 'logfile' in kwargs:
> + logfile = kwargs['logfile']
> + del kwargs['logfile']
> + if logfile:
> + teecmd = ['tee', '-a', logfile]
> + return self._app.runcmd(real_argv, teecmd, **kwargs)
> + else:
> + return self._app.runcmd(real_argv, **kwargs)
> except cliapp.AppException as e:
> raise cliapp.AppException('In staging area %s: running '
> 'command \'%s\' failed.' %
What happens if kwargs does not contain logfile? Looks to me like the
code doesn't run anything at all then.
Thanks for spotting this, that 'if logfile' block is not supposed to be
indented, raising it one indentation level should fix it.