Skip to content

Commit f11fdf1

Browse files
committed
remote, #519: FIX1-of-2 double-decoding push-infos
+ When `universal_lines==True` (515a6b9) must tel `handle_process_output` to stop decoding strings.
1 parent cf2335a commit f11fdf1

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

‎git/remote.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,8 @@ def stdout_handler(line):
681681
# END for each line
682682

683683
try:
684-
handle_process_output(proc, stdout_handler, progress_handler, finalize_process)
684+
handle_process_output(proc, stdout_handler, progress_handler, finalize_process,
685+
decode_stdout=False, decode_stderr=False)
685686
except Exception:
686687
if len(output) == 0:
687688
raise

‎git/test/lib/helper.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,10 @@ def remote_repo_creator(self):
258258
# We assume in good faith that we didn't start the daemon - but make sure we kill it anyway
259259
# Of course we expect it to work here already, but maybe there are timing constraints
260260
# on some platforms ?
261-
if gd is not None:
261+
try:
262262
gd.proc.terminate()
263+
except Exception as ex:
264+
log.debug("Ignoring %r while terminating proc after %r.", ex, e)
263265
log.warning('git(%s) ls-remote failed due to:%s',
264266
rw_repo.git_dir, e)
265267
if is_win:
@@ -296,8 +298,10 @@ def remote_repo_creator(self):
296298
os.chdir(prev_cwd)
297299

298300
finally:
299-
if gd is not None:
301+
try:
300302
gd.proc.kill()
303+
except:
304+
pass ## Either it has died (and we're here), or it won't die, again here...
301305

302306
rw_repo.git.clear_cache()
303307
rw_remote_repo.git.clear_cache()

‎git/util.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44
# This module is part of GitPython and is released under
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
6+
from __future__ import unicode_literals
67

78
import os
89
import re

0 commit comments

Comments
 (0)