From 0dee1d1358c95e07637876af1f508f0fd694a809 Mon Sep 17 00:00:00 2001 From: "Fan, ZhijuX" Date: Mon, 2 Dec 2019 11:50:48 +0800 Subject: BaseTools:fix issue for decode the stdout/stderr byte arrays BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2365 This patch is to fix a build tool regression issue which was introduced by commit 8ddec24dea74. compiler output message includes localized string. So build failed when code decode the stdout/stderr byte arrays. The cause of the build failed is that Commit 8ddec24dea74 removed "errors='ignore'". The build tool does not need to deal with localized string, so we need to add "errors='ignore'". this function is only invoked for structure PCDs. Build failed if structurePcd is used in platform dsc file. The patch is going to fixed this issue Cc: Liming Gao Cc: Bob Feng Signed-off-by: Zhiju.Fan Reviewed-by: Bob Feng --- BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index 6d32b63cd1..1afbd3eefc 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1769,7 +1769,7 @@ class DscBuildData(PlatformBuildClassObject): except: EdkLogger.error('Build', COMMAND_FAILURE, 'Can not execute command: %s' % Command) Result = Process.communicate() - return Process.returncode, Result[0].decode(), Result[1].decode() + return Process.returncode, Result[0].decode(errors='ignore'), Result[1].decode(errors='ignore') @staticmethod def IntToCString(Value, ValueSize): -- cgit v1.2.3