mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
decode the buffer before appending
output from a process is in bytes in python3. we need to decode it. in Python3, bytes don't have an encode attribute. use this to identify it. Change-Id: I152f2ec34614131027db680ead98b53f9b321ed5
This commit is contained in:
parent
472ce9f5fa
commit
6cfc68e1e6
@ -263,6 +263,8 @@ class GitCommand(object):
|
|||||||
if not buf:
|
if not buf:
|
||||||
s_in.remove(s)
|
s_in.remove(s)
|
||||||
continue
|
continue
|
||||||
|
if not hasattr(buf, 'encode'):
|
||||||
|
buf = buf.decode()
|
||||||
if s.std_name == 'stdout':
|
if s.std_name == 'stdout':
|
||||||
self.stdout += buf
|
self.stdout += buf
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user