Merge pull request #1746 from pijyoi/fix_cprint_remote

fix: cprint of remote output needs decode()
This commit is contained in:
Ogi Moore 2021-04-28 20:46:24 -07:00 committed by GitHub
commit fe66f3fd12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -489,12 +489,12 @@ class FileForwarder(threading.Thread):
while not self.finish.is_set():
line = self.input.readline()
with self.lock:
cprint.cout(self.color, line, -1)
cprint.cout(self.color, line.decode('utf8'), -1)
elif self.output == 'stderr' and self.color is not False:
while not self.finish.is_set():
line = self.input.readline()
with self.lock:
cprint.cerr(self.color, line, -1)
cprint.cerr(self.color, line.decode('utf8'), -1)
else:
if isinstance(self.output, str):
self.output = getattr(sys, self.output)