aboutsummaryrefslogtreecommitdiff
path: root/tools/patman/cros_subprocess.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/patman/cros_subprocess.py')
-rw-r--r--tools/patman/cros_subprocess.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/patman/cros_subprocess.py b/tools/patman/cros_subprocess.py
index ebd4300..7c76014 100644
--- a/tools/patman/cros_subprocess.py
+++ b/tools/patman/cros_subprocess.py
@@ -190,6 +190,8 @@ class Popen(subprocess.Popen):
# We will get an error on read if the pty is closed
try:
data = os.read(self.stdout.fileno(), 1024)
+ if isinstance(data, bytes):
+ data = data.decode('utf-8')
except OSError:
pass
if data == "":
@@ -205,6 +207,8 @@ class Popen(subprocess.Popen):
# We will get an error on read if the pty is closed
try:
data = os.read(self.stderr.fileno(), 1024)
+ if isinstance(data, bytes):
+ data = data.decode('utf-8')
except OSError:
pass
if data == "":