diff options
| author | Anthony King <anthonydking@slimroms.net> | 2015-06-03 16:39:32 +0100 |
|---|---|---|
| committer | Anthony King <anthonydking@slimroms.net> | 2015-06-03 16:39:32 +0100 |
| commit | 6cfc68e1e635162926d27f3421f1dbc729c55116 (patch) | |
| tree | be03513ffb7232002969971c5355dda81fe32ee5 /git_command.py | |
| parent | 472ce9f5fa61a953b9275cfe36b8b86f3dad5c73 (diff) | |
| download | git-repo-6cfc68e1e635162926d27f3421f1dbc729c55116.tar.gz | |
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
Diffstat (limited to 'git_command.py')
| -rw-r--r-- | git_command.py | 2 |
1 files changed, 2 insertions, 0 deletions
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): | |||
| 263 | if not buf: | 263 | if not buf: |
| 264 | s_in.remove(s) | 264 | s_in.remove(s) |
| 265 | continue | 265 | continue |
| 266 | if not hasattr(buf, 'encode'): | ||
| 267 | buf = buf.decode() | ||
| 266 | if s.std_name == 'stdout': | 268 | if s.std_name == 'stdout': |
| 267 | self.stdout += buf | 269 | self.stdout += buf |
| 268 | else: | 270 | else: |
