summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMike Crowe <mac@mcrowe.com>2017-02-24 16:20:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-01 11:16:07 +0000
commit7b75bf85059f0d4fc873b27d31ff17eb97815db9 (patch)
tree3ffc90e05e3000963b132ae71c6e787f514b420b /bitbake
parent32428263047c3dabdc06556242c3baaedac664ad (diff)
downloadpoky-7b75bf85059f0d4fc873b27d31ff17eb97815db9.tar.gz
bitbake: process: stop bb.process.communicate mixing bytes and str return types
Python3 regards b"" as False so it is not being converted to a string by d0f904d407f57998419bd9c305ce53e5eaa36b24. This confusingly causes three different potential types for each member of the returned tuple. Let's just assume that everything that's not None is a bytes object and convert it to a string. (Bitbake rev: 0cf5589b7fb3582a6caca5014c4d8152347df545) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/process.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/process.py b/bitbake/lib/bb/process.py
index c62d7bca4f..a4a559982c 100644
--- a/bitbake/lib/bb/process.py
+++ b/bitbake/lib/bb/process.py
@@ -162,9 +162,9 @@ def run(cmd, input=None, log=None, extrafiles=None, **options):
162 stdout, stderr = _logged_communicate(pipe, log, input, extrafiles) 162 stdout, stderr = _logged_communicate(pipe, log, input, extrafiles)
163 else: 163 else:
164 stdout, stderr = pipe.communicate(input) 164 stdout, stderr = pipe.communicate(input)
165 if stdout: 165 if not stdout is None:
166 stdout = stdout.decode("utf-8") 166 stdout = stdout.decode("utf-8")
167 if stderr: 167 if not stderr is None:
168 stderr = stderr.decode("utf-8") 168 stderr = stderr.decode("utf-8")
169 169
170 if pipe.returncode != 0: 170 if pipe.returncode != 0: