Skip to content

Commit 3c19a6e

Browse files
x-santiaga-xByron
authored andcommitted
fix universal_newlines TypeError
Fixes #1116
1 parent 4a1339a commit 3c19a6e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

git/cmd.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,9 @@ def _kill_process(pid):
785785
watchdog.cancel()
786786
if kill_check.isSet():
787787
stderr_value = ('Timeout: the command "%s" did not complete in %d '
788-
'secs.' % (" ".join(command), kill_after_timeout)).encode(defenc)
788+
'secs.' % (" ".join(command), kill_after_timeout))
789+
if not universal_newlines:
790+
stderr_value = stderr_value.encode(defenc)
789791
# strip trailing "\n"
790792
if stdout_value.endswith(newline):
791793
stdout_value = stdout_value[:-1]

0 commit comments

Comments
 (0)