[tools] Fixed git_blame not handling binary files.
This commit is contained in:
parent
820b89e676
commit
dec0f5ed29
2 changed files with 4 additions and 3 deletions
|
|
@ -102,7 +102,8 @@ def _printable(text):
|
|||
|
||||
|
||||
def _fix_input(input_):
|
||||
input_str = input_.decode("utf-8") if isinstance(input_, bytes) else input_
|
||||
input_str = (input_.decode("utf-8", errors="replace")
|
||||
if isinstance(input_, bytes) else input_)
|
||||
return _printable(input_str).expandtabs(tabsize=4)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue