[git-buildpackage] [PATCH 08/11] Command: redirect stderr to stdout

Guido Günther agx at sigxcpu.org
Wed Apr 1 21:13:31 CEST 2015


On Thu, Feb 05, 2015 at 05:13:11PM +0200, Markus Lehtonen wrote:
> Makes it possible to get all command output from stdout.
> 
> Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
> ---
>  gbp/command_wrappers.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py
> index d66bfda..f8c50f1 100644
> --- a/gbp/command_wrappers.py
> +++ b/gbp/command_wrappers.py
> @@ -68,7 +68,8 @@ class Command(object):
>          log.debug("%s %s %s" % (self.cmd, self.args, args))
>          self._reset_state()
>          stdout_arg = subprocess.PIPE if self.capture_stdout else None
> -        stderr_arg = subprocess.PIPE if self.capture_stderr else None
> +        stderr_arg = subprocess.PIPE if self.capture_stderr else \
> +                                        subprocess.STDOUT

I'd rather keep these separate (being able to not capture at all).
Cheers,
 -- Guido

>          cmd = [ self.cmd ] + self.args + args
>          if self.shell:
>              # subprocess.call only cares about the first argument if shell=True
> -- 
> 2.1.4


More information about the git-buildpackage mailing list