From 60e54133aa1105a1270f0a42e74813f75cd2dc46 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 6 Jan 2015 12:22:16 +0100 Subject: test_remote works And I have to wonder why git-daemon serves under py2.7, but really wants receive-pack to be allowed under 3.4. Maybe it's a repository override which for some reason doesn't work in py3.4 ? Maybe because the change is not flushed ? --- git/exc.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'git/exc.py') diff --git a/git/exc.py b/git/exc.py index ba57c624..67fb9894 100644 --- a/git/exc.py +++ b/git/exc.py @@ -29,10 +29,12 @@ class GitCommandError(Exception): self.command = command def __str__(self): - ret = "'%s' returned exit status %i: %s" % \ - (' '.join(str(i) for i in self.command), self.status, self.stderr) - if self.stdout is not None: - ret += "\nstdout: %s" % self.stdout + ret = "'%s' returned with exit code %i" % \ + (' '.join(str(i) for i in self.command), self.status) + if self.stderr: + ret += "\nstderr: '%s'" % self.stderr + if self.stdout: + ret += "\nstdout: '%s'" % self.stdout return ret -- cgit v1.2.1 From a05e49d2419d65c59c65adf5cd8c05f276550e1d Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 6 Jan 2015 14:05:30 +0100 Subject: test_repo works --- git/exc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'git/exc.py') diff --git a/git/exc.py b/git/exc.py index 67fb9894..42191c62 100644 --- a/git/exc.py +++ b/git/exc.py @@ -7,6 +7,8 @@ from gitdb.exc import * # NOQA +from git.compat import defenc + class InvalidGitRepositoryError(Exception): @@ -32,9 +34,9 @@ class GitCommandError(Exception): ret = "'%s' returned with exit code %i" % \ (' '.join(str(i) for i in self.command), self.status) if self.stderr: - ret += "\nstderr: '%s'" % self.stderr + ret += "\nstderr: '%s'" % self.stderr.decode(defenc) if self.stdout: - ret += "\nstdout: '%s'" % self.stdout + ret += "\nstdout: '%s'" % self.stdout.decode(defenc) return ret -- cgit v1.2.1