Skip to content

Commit

Permalink
fix universal_newlines TypeError
Browse files Browse the repository at this point in the history
Fixes #1116
  • Loading branch information
x-santiaga-x authored and Byron committed Jan 28, 2021
1 parent 4a1339a commit 3c19a6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,9 @@ def _kill_process(pid):
watchdog.cancel()
if kill_check.isSet():
stderr_value = ('Timeout: the command "%s" did not complete in %d '
'secs.' % (" ".join(command), kill_after_timeout)).encode(defenc)
'secs.' % (" ".join(command), kill_after_timeout))
if not universal_newlines:
stderr_value = stderr_value.encode(defenc)
# strip trailing "\n"
if stdout_value.endswith(newline):
stdout_value = stdout_value[:-1]
Expand Down

0 comments on commit 3c19a6e

Please sign in to comment.