aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/git
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-03-14 08:26:12 +0100
committerGuido Günther <agx@sigxcpu.org>2017-03-14 08:28:17 +0100
commitfe821e2bec0df8611c2d0639a52baa8ddc84cc28 (patch)
tree48e9d9351753af8e04f7dc67ab8d7d73d77a9d8f /gbp/git
parentd5f0a18baba7b9ee9ce67cf11eae87a8ca621890 (diff)
GitRepository: use stdout as last resort if stderr is empty
This e.g. gives: GitRepositoryError: Error running git commit: On branch master Untracked files: debian/ nothing added to commit but untracked files present Instead of GitRepositoryError: Error running git commit:
Diffstat (limited to 'gbp/git')
-rw-r--r--gbp/git/repository.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index 75f2ebc7..f1cd15a3 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -239,7 +239,8 @@ class GitRepository(object):
except Exception as excobj:
raise GitRepositoryError("Error running git %s: %s" % (command, excobj))
if ret:
- raise GitRepositoryError("Error running git %s: %s" % (command, stderr))
+ detail = stderr or stdout
+ raise GitRepositoryError("Error running git %s: %s" % (command, detail))
def _cmd_has_feature(self, command, feature):
"""