From 6cfc68e1e635162926d27f3421f1dbc729c55116 Mon Sep 17 00:00:00 2001 From: Anthony King Date: Wed, 3 Jun 2015 16:39:32 +0100 Subject: 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 --- git_command.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'git_command.py') diff --git a/git_command.py b/git_command.py index 259fb02c..3095fda1 100644 --- a/git_command.py +++ b/git_command.py @@ -263,6 +263,8 @@ class GitCommand(object): if not buf: s_in.remove(s) continue + if not hasattr(buf, 'encode'): + buf = buf.decode() if s.std_name == 'stdout': self.stdout += buf else: -- cgit v1.2.3-54-g00ecf