]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools:fix issue for decode the stdout/stderr byte arrays
authorFan, ZhijuX <zhijux.fan@intel.com>
Mon, 2 Dec 2019 03:50:48 +0000 (11:50 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 24 Mar 2020 02:27:27 +0000 (02:27 +0000)
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 <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Source/Python/Workspace/DscBuildData.py

index 6d32b63cd19dfb04942575052fac1e67e16c588c..1afbd3eefc6c7b7401c845ab64c3b23cd251f379 100644 (file)
@@ -1769,7 +1769,7 @@ class DscBuildData(PlatformBuildClassObject):
         except:\r
             EdkLogger.error('Build', COMMAND_FAILURE, 'Can not execute command: %s' % Command)\r
         Result = Process.communicate()\r
-        return Process.returncode, Result[0].decode(), Result[1].decode()\r
+        return Process.returncode, Result[0].decode(errors='ignore'), Result[1].decode(errors='ignore')\r
 \r
     @staticmethod\r
     def IntToCString(Value, ValueSize):\r