diff options
author | Aníbal Limón <anibal.limon@linaro.org> | 2018-12-19 19:35:54 -0600 |
---|---|---|
committer | Aníbal Limón <anibal.limon@linaro.org> | 2018-12-19 19:35:54 -0600 |
commit | cceef83e55abb8932398e30c2e145823b319e19d (patch) | |
tree | e73da60943fa0b1e4d8af3a01b6039a203842f88 | |
parent | 82dd833c7abac9bbc4fe73ccbd657abcf29c5bff (diff) |
automated/linux/ptest/ptest.py: Set unicode decode to replace2018.12
In order to don't fail when trying to decode non-unicode value.
See [1]:
...
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 3
...
[1] https://lava.automotivelinux.org/scheduler/job/2254#L2718
Change-Id: Icfd10e9a43599789fc7859b9dbe425582e2e15a4
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
-rwxr-xr-x | automated/linux/ptest/ptest.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/automated/linux/ptest/ptest.py b/automated/linux/ptest/ptest.py index 386792fc..384e7484 100755 --- a/automated/linux/ptest/ptest.py +++ b/automated/linux/ptest/ptest.py @@ -53,7 +53,7 @@ def get_available_ptests(ptest_dir): ptests = [] ptest_rex = re.compile("^(?P<ptest_name>.*)\t") - for line in output.decode('utf-8').split('\n'): + for line in output.decode('utf-8', errors="replace").split('\n'): m = ptest_rex.search(line) if m: ptests.append(m.group('ptest_name')) @@ -111,7 +111,7 @@ def run_ptest(command): try: output = unicode(output, "utf-8").strip() except: - output = output.decode("utf-8").strip() + output = output.decode("utf-8", errors="replace").strip() if len(output) == 0 and process.poll() is not None: break if output: |