diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-20 11:17:05 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-02 08:24:00 +0100 |
commit | a7309d5790f5dac46e84d3c14959943eb2496fda (patch) | |
tree | 48e1fcb886b8ef2974bade09694356f3230fb8a8 /meta/lib/oeqa/runtime/parselogs.py | |
parent | 297438e965053b2eb56cc8ef3e59465642f10a24 (diff) | |
download | poky-a7309d5790f5dac46e84d3c14959943eb2496fda.tar.gz |
classes/lib: Update to use python3 command pipeline decoding
In python3, strings are unicode by default. We need to encode/decode
from command pipelines and other places where we interface with the
real world using the correct locales. This patch updates various
call sites to use the correct encoding/decodings.
(From OE-Core rev: bb4685af1bffe17b3aa92a6d21398f38a44ea874)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime/parselogs.py')
-rw-r--r-- | meta/lib/oeqa/runtime/parselogs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/runtime/parselogs.py b/meta/lib/oeqa/runtime/parselogs.py index a93660131d..242cd8cdd5 100644 --- a/meta/lib/oeqa/runtime/parselogs.py +++ b/meta/lib/oeqa/runtime/parselogs.py | |||
@@ -238,7 +238,7 @@ class ParseLogsTest(oeRuntimeTest): | |||
238 | result = None | 238 | result = None |
239 | thegrep = self.build_grepcmd(errors, ignore_errors, log) | 239 | thegrep = self.build_grepcmd(errors, ignore_errors, log) |
240 | try: | 240 | try: |
241 | result = subprocess.check_output(thegrep, shell=True) | 241 | result = subprocess.check_output(thegrep, shell=True).decode("utf-8") |
242 | except: | 242 | except: |
243 | pass | 243 | pass |
244 | if (result is not None): | 244 | if (result is not None): |
@@ -246,7 +246,7 @@ class ParseLogsTest(oeRuntimeTest): | |||
246 | rez = result.splitlines() | 246 | rez = result.splitlines() |
247 | for xrez in rez: | 247 | for xrez in rez: |
248 | try: | 248 | try: |
249 | grep_output = subprocess.check_output(['grep', '-F', xrez, '-B', str(lines_before), '-A', str(lines_after), log]) | 249 | grep_output = subprocess.check_output(['grep', '-F', xrez, '-B', str(lines_before), '-A', str(lines_after), log]).decode("utf-8") |
250 | except: | 250 | except: |
251 | pass | 251 | pass |
252 | results[log.replace('target_logs/','')][xrez]=grep_output | 252 | results[log.replace('target_logs/','')][xrez]=grep_output |