mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
scripts: Fix encoding errors for python3
Moved call of decode('utf-8') as close as possible to
call of subprocess API to avoid calling it in a lot of
other places.
Decoded binary data to utf-8 where appropriate to fix devtool
and recipetool tests in python 3 environment.
(From OE-Core rev: 30d02e2aa2d42fdf76271234b2dc9f37bc46b250)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
ed7abe6b9a
commit
3ee70cb725
@@ -292,7 +292,10 @@ class GitApplyTree(PatchTree):
|
||||
def decodeAuthor(line):
|
||||
from email.header import decode_header
|
||||
authorval = line.split(':', 1)[1].strip().replace('"', '')
|
||||
return decode_header(authorval)[0][0]
|
||||
result = decode_header(authorval)[0][0]
|
||||
if hasattr(result, 'decode'):
|
||||
result = result.decode('utf-8')
|
||||
return result
|
||||
|
||||
@staticmethod
|
||||
def interpretPatchHeader(headerlines):
|
||||
|
||||
Reference in New Issue
Block a user