summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-05-18 21:57:23 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 08:24:01 +0100
commit3ee70cb7259aad3b53e51884ec5b9122e804d77e (patch)
treefe11513a46170019cdd674002c6cc5b2045b762a /scripts/lib/devtool
parented7abe6b9a2ff81d320e7c63841487d37e61b5a5 (diff)
downloadpoky-3ee70cb7259aad3b53e51884ec5b9122e804d77e.tar.gz
scripts: Fix encoding errors for python3
Moved call of decode('utf-8') as close as possible to call of subprocess API to avoid calling it in a lot of other places. Decoded binary data to utf-8 where appropriate to fix devtool and recipetool tests in python 3 environment. (From OE-Core rev: 30d02e2aa2d42fdf76271234b2dc9f37bc46b250) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool')
-rw-r--r--scripts/lib/devtool/__init__.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
index 6f5bb8dba0..70053631e8 100644
--- a/scripts/lib/devtool/__init__.py
+++ b/scripts/lib/devtool/__init__.py
@@ -69,6 +69,7 @@ def exec_watch(cmd, **options):
69 buf = '' 69 buf = ''
70 while True: 70 while True:
71 out = process.stdout.read(1) 71 out = process.stdout.read(1)
72 out = out.decode('utf-8')
72 if out: 73 if out:
73 sys.stdout.write(out) 74 sys.stdout.write(out)
74 sys.stdout.flush() 75 sys.stdout.flush()