summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
Diffstat (limited to 'git')
-rw-r--r--git/remote.py1
-rw-r--r--git/test/test_git.py8
2 files changed, 7 insertions, 2 deletions
diff --git a/git/remote.py b/git/remote.py
index 7cb0f4f8..00d95b3c 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -551,6 +551,7 @@ class Remote(LazyMixin, Iterable):
progress_handler = progress.new_message_handler()
for line in proc.stderr.readlines():
+ line = line.decode(defenc)
for pline in progress_handler(line):
if line.startswith('fatal:') or line.startswith('error:'):
raise GitCommandError(("Error when fetching: %s" % line,), 2)
diff --git a/git/test/test_git.py b/git/test/test_git.py
index fe7ec970..fca00d40 100644
--- a/git/test/test_git.py
+++ b/git/test/test_git.py
@@ -201,8 +201,12 @@ class TestGit(TestBase):
try:
remote.fetch()
except GitCommandError as err:
- assert 'ssh-origin' in str(err)
- assert err.status == 128
+ if sys.version_info[0] < 3:
+ assert 'ssh-origin' in str(err)
+ assert err.status == 128
+ else:
+ assert 'FOO' in str(err)
+ assert err.status == 2
# end
# end
# end if select.poll exists