mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-02-03 16:14:27 +00:00
Use 'backslashreplace' for decode
Resolve TODO as we are now requiring Python 3. Change-Id: I7821627bd5c606276741c98efedaf5b11aecbcc3 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/354702 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Daniel Kutik <daniel.kutik@lavawerk.com>
This commit is contained in:
parent
e641281d14
commit
7438aef1ca
3
repo
3
repo
@ -447,8 +447,7 @@ def run_command(cmd, **kwargs):
|
||||
except UnicodeError:
|
||||
print('repo: warning: Invalid UTF-8 output:\ncmd: %r\n%r' % (cmd, output),
|
||||
file=sys.stderr)
|
||||
# TODO(vapier): Once we require Python 3, use 'backslashreplace'.
|
||||
return output.decode('utf-8', 'replace')
|
||||
return output.decode('utf-8', 'backslashreplace')
|
||||
|
||||
# Run & package the results.
|
||||
proc = subprocess.Popen(cmd, **kwargs)
|
||||
|
Loading…
x
Reference in New Issue
Block a user