BaseTools: Correct BPDG tool error prints

Popen communication returns bytestrings. It is necessary to perform
decode on these strings before passing them to the EdkLogger that
works with ordinary strings.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
Konstantin Aladyshev 2022-09-05 17:19:23 +08:00 committed by mergify[bot]
parent 09e74b81ba
commit 81aeb94648
1 changed files with 2 additions and 2 deletions

View File

@ -248,8 +248,8 @@ def CallExtenalBPDGTool(ToolPath, VpdFileName):
PopenObject.wait()
if PopenObject.returncode != 0:
EdkLogger.debug(EdkLogger.DEBUG_1, "Fail to call BPDG tool", str(error))
EdkLogger.debug(EdkLogger.DEBUG_1, "Fail to call BPDG tool", str(error.decode()))
EdkLogger.error("BPDG", BuildToolError.COMMAND_FAILURE, "Fail to execute BPDG tool with exit code: %d, the error message is: \n %s" % \
(PopenObject.returncode, str(error)))
(PopenObject.returncode, str(error.decode())))
return PopenObject.returncode