diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-06-02 13:13:00 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-03 13:13:29 +0100 |
commit | 4e36eeee7797ed1e3418b3ccb81797211edab573 (patch) | |
tree | b88f5a54e1c8d35d423c309e17f5c5d6c06bc5b2 /scripts/oe-selftest | |
parent | a8314b9531c82d8e9a33792af8a804da2ad2a8fb (diff) | |
download | poky-4e36eeee7797ed1e3418b3ccb81797211edab573.tar.gz |
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 <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-selftest')
-rwxr-xr-x | scripts/oe-selftest | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/oe-selftest b/scripts/oe-selftest index b1ecf7f322..df76f94f7a 100755 --- a/scripts/oe-selftest +++ b/scripts/oe-selftest | |||
@@ -371,7 +371,7 @@ def coverage_setup(coverage_source, coverage_include, coverage_omit): | |||
371 | import subprocess | 371 | import subprocess |
372 | builddir = os.environ.get("BUILDDIR") | 372 | builddir = os.environ.get("BUILDDIR") |
373 | pokydir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) | 373 | pokydir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) |
374 | curcommit= subprocess.check_output(["git", "--git-dir", os.path.join(pokydir, ".git"), "rev-parse", "HEAD"]) | 374 | curcommit= subprocess.check_output(["git", "--git-dir", os.path.join(pokydir, ".git"), "rev-parse", "HEAD"]).decode('utf-8') |
375 | coveragerc = "%s/.coveragerc" % builddir | 375 | coveragerc = "%s/.coveragerc" % builddir |
376 | data_file = "%s/.coverage." % builddir | 376 | data_file = "%s/.coverage." % builddir |
377 | data_file += datetime.datetime.now().strftime('%Y%m%dT%H%M%S') | 377 | data_file += datetime.datetime.now().strftime('%Y%m%dT%H%M%S') |