From 1dbfd290609fe43ca7d94e06cea0d60333343838 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Thu, 5 Oct 2017 12:19:17 -0400 Subject: [PATCH] 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 --- git/cmd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git/cmd.py b/git/cmd.py index e0946e47b..13c01401d 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -780,8 +780,8 @@ def _kill_process(pid): 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]