aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/command_wrappers.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-11-04 16:19:35 +0100
committerGuido Günther <agx@sigxcpu.org>2016-11-04 16:26:10 +0100
commitea5775a23e5223026b37100d23229b1bfc39bafa (patch)
tree3f715a64685ce1a5880a13d0706d8fea4cae8329 /gbp/command_wrappers.py
parentced46db062f8e38c0eed7d1feb6e6e8b0d6435f9 (diff)
commands: allow to fall back to error reason if stderr is empty
Use this in PristineTar and SrcRpmFile to give better error messages if the command doesn't even get to print to stderr (i.e. missing on disk). Closes: #842592
Diffstat (limited to 'gbp/command_wrappers.py')
-rw-r--r--gbp/command_wrappers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py
index e16c1080..f4b00b89 100644
--- a/gbp/command_wrappers.py
+++ b/gbp/command_wrappers.py
@@ -140,8 +140,10 @@ class Command(object):
"""
stdout = self.stdout.rstrip() if self.stdout else self.stdout
stderr = self.stderr.rstrip() if self.stderr else self.stderr
+ stderr_or_reason = self.stderr.rstrip() if self.stderr else self.err_reason
return self.run_error.format(stdout=stdout,
stderr=stderr,
+ stderr_or_reason=stderr_or_reason,
err_reason=self.err_reason)
def __call__(self, args=[], quiet=False):