diff options
author | Paul Belanger <pabelanger@redhat.com> | 2017-10-05 12:19:17 -0400 |
---|---|---|
committer | Paul Belanger <pabelanger@redhat.com> | 2017-10-05 13:26:26 -0400 |
commit | 1dbfd290609fe43ca7d94e06cea0d60333343838 (patch) | |
tree | 361198ce27124885c231d010521b4a3ee004150a /git/cmd.py | |
parent | 95ff8274a0a0a723349416c60e593b79d16227dc (diff) | |
download | gitpython-1dbfd290609fe43ca7d94e06cea0d60333343838.tar.gz |
Fix encoding issue with stderr_value and kill_after_timeout
We don't properly encode our error message under python3.
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Diffstat (limited to 'git/cmd.py')
-rw-r--r-- | git/cmd.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -780,8 +780,8 @@ class Git(LazyMixin): if kill_after_timeout: watchdog.cancel() if kill_check.isSet(): - stderr_value = 'Timeout: the command "%s" did not complete in %d ' \ - 'secs.' % (" ".join(command), kill_after_timeout) + stderr_value = ('Timeout: the command "%s" did not complete in %d ' + 'secs.' % (" ".join(command), kill_after_timeout)).encode(defenc) # strip trailing "\n" if stdout_value.endswith(b"\n"): stdout_value = stdout_value[:-1] |