Update remote-run (#64880)

replace encoding errors when using utf-8
This commit is contained in:
Justice Adams
2023-04-04 12:01:50 -07:00
committed by GitHub
parent 2f99a4ee89
commit 444fcbc528

View File

@@ -96,8 +96,8 @@ class CommandRunner(object):
return
stdout, stderr = remote_proc.communicate()
stdout = stdout.decode('utf-8')
stderr = stderr.decode('utf-8')
stdout = stdout.decode(encoding='utf-8', errors='replace')
stderr = stderr.decode(encoding='utf-8', errors='replace')
# Print stdout to screen
print(stdout, end='')
@@ -140,8 +140,8 @@ class CommandRunner(object):
if self.verbose:
print(sources, file=sys.stderr)
stdout, stderr = rsync_proc.communicate(sources.encode('utf-8'))
stdout = stdout.decode('utf-8')
stderr = stderr.decode('utf-8')
stdout = stdout.decode(encoding='utf-8', errors='replace')
stderr = stderr.decode(encoding='utf-8', errors='replace')
# Print stdout to screen
print(stdout, end='')