From 30d02e2aa2d42fdf76271234b2dc9f37bc46b250 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Wed, 18 May 2016 21:57:23 +0300 Subject: 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. Signed-off-by: Ed Bartosh --- scripts/lib/devtool/__init__.py | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/lib/devtool/__init__.py') 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): buf = '' while True: out = process.stdout.read(1) + out = out.decode('utf-8') if out: sys.stdout.write(out) sys.stdout.flush() -- cgit v1.2.3