diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-05 15:53:46 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-05 15:53:46 +0100 |
commit | 04357d0d46fee938a618b64daed1716606e05ca5 (patch) | |
tree | ab7f0a4ecc047f4710b7e5cf7182cc3e22e477fc /git/remote.py | |
parent | bc8c91200a7fb2140aadd283c66b5ab82f9ad61e (diff) | |
download | gitpython-04357d0d46fee938a618b64daed1716606e05ca5.tar.gz |
Intermediate commit: test_config and test_actor works
Kind of tackling the tasks step by step, picking low-hanging fruit first,
or the ones that everyone depends on
Diffstat (limited to 'git/remote.py')
-rw-r--r-- | git/remote.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/git/remote.py b/git/remote.py index 9ebc52fe..63f21c4e 100644 --- a/git/remote.py +++ b/git/remote.py @@ -32,6 +32,7 @@ from git.util import ( finalize_process ) from gitdb.util import join +from git.compat import defenc __all__ = ('RemoteProgress', 'PushInfo', 'FetchInfo', 'Remote') @@ -46,16 +47,16 @@ def digest_process_messages(fh, progress): :param fh: File handle to read from :return: list(line, ...) list of lines without linebreaks that did not contain progress information""" - line_so_far = '' + line_so_far = b'' dropped_lines = list() while True: - char = fh.read(1) + char = fh.read(1) # reads individual single byte strings if not char: break - if char in ('\r', '\n') and line_so_far: - dropped_lines.extend(progress._parse_progress_line(line_so_far)) - line_so_far = '' + if char in (b'\r', b'\n') and line_so_far: + dropped_lines.extend(progress._parse_progress_line(line_so_far.decode(defenc))) + line_so_far = b'' else: line_so_far += char # END process parsed line |