From 4e36eeee7797ed1e3418b3ccb81797211edab573 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Thu, 2 Jun 2016 13:13:00 +0300 Subject: scripts: python3: decode subprocess output stdeout and stderr content returned by subprocess API has different types in Python 3(bytes) and Python 2(string). Decoding it to 'utf-8' makes it unicode on both pythons. (From OE-Core rev: ae4d36375683b6cfd48af25bfca70b2e77f7ade5) Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- scripts/cleanup-workdir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/cleanup-workdir') diff --git a/scripts/cleanup-workdir b/scripts/cleanup-workdir index fee464c31d..0b2cf99d78 100755 --- a/scripts/cleanup-workdir +++ b/scripts/cleanup-workdir @@ -45,7 +45,7 @@ def run_command(cmd): if pipe.returncode != 0: print("Execute command '%s' failed." % cmd) sys.exit(1) - return output + return output.decode('utf-8') def get_cur_arch_dirs(workdir, arch_dirs): pattern = workdir + '/(.*?)/' -- cgit 1.2.3-korg