summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorKonstantin Aladyshev <aladyshev22@gmail.com>2022-09-05 17:19:23 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-10-19 06:32:07 +0000
commit81aeb9464821b59aa850c681abca3524d5164cc8 (patch)
treeb4601365c35f121d5ac67225552abd7bb09645b8 /BaseTools
parent09e74b81ba7178588d4636762ffb852987f18525 (diff)
downloadedk2-81aeb9464821b59aa850c681abca3524d5164cc8.tar.gz
edk2-81aeb9464821b59aa850c681abca3524d5164cc8.tar.bz2
edk2-81aeb9464821b59aa850c681abca3524d5164cc8.zip
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>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/Common/VpdInfoFile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Common/VpdInfoFile.py b/BaseTools/Source/Python/Common/VpdInfoFile.py
index 4249b9f899..1e0c3dfe76 100644
--- a/BaseTools/Source/Python/Common/VpdInfoFile.py
+++ b/BaseTools/Source/Python/Common/VpdInfoFile.py
@@ -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