fix: cprint of remote output needs decode()

This commit is contained in:
KIU Shueng Chuan 2021-04-28 16:38:15 +08:00
parent 2cbc86bee1
commit 306e9c2498

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)