Skip to content

Commit 1dbfd29

Browse files
committed
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 <[email protected]>
1 parent 95ff827 commit 1dbfd29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎git/cmd.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,8 +780,8 @@ def _kill_process(pid):
780780
ifkill_after_timeout:
781781
watchdog.cancel()
782782
ifkill_check.isSet():
783-
stderr_value='Timeout: the command "%s" did not complete in %d ' \
784-
'secs.'% (" ".join(command), kill_after_timeout)
783+
stderr_value=('Timeout: the command "%s" did not complete in %d '
784+
'secs.'% (" ".join(command), kill_after_timeout)).encode(defenc)
785785
# strip trailing "\n"
786786
ifstdout_value.endswith(b"\n"):
787787
stdout_value=stdout_value[:-1]

0 commit comments

Comments
(0)