summaryrefslogtreecommitdiff
path: root/gbp/git/repository.py
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-12-11 15:50:13 +0200
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-06-05 14:20:03 +0300
commitf7c0314950309af62f819f0eaf50a6d48c10afd0 (patch)
tree9bd12af29e590eb49cd4595241147de4aeebbb21 /gbp/git/repository.py
parent144b034ee8a1d300ca99826094e5060dc2288809 (diff)
downloadgit-buildpackage-f7c0314950309af62f819f0eaf50a6d48c10afd0.tar.gz
git-buildpackage-f7c0314950309af62f819f0eaf50a6d48c10afd0.tar.bz2
git-buildpackage-f7c0314950309af62f819f0eaf50a6d48c10afd0.zip
GitRepository/git_command: strip stderr output in case of error
In order to get rid of extra line feeds in exception message. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp/git/repository.py')
-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 1b696406..ec36ea01 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -276,7 +276,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))
+ raise GitRepositoryError("Error running git %s: %s" %
+ (command, stderr.strip()))
def _cmd_has_feature(self, command, feature):