[edk2-devel] 回复: [PATCH] BaseTools: Correct BPDG tool error prints

gaoliming via groups.io gaoliming=byosoft.com.cn at groups.io
Wed Sep 21 00:58:56 UTC 2022


Reviewed-by: Liming Gao <gaoliming at byosoft.com.cn>

> -----邮件原件-----
> 发件人: Konstantin Aladyshev <aladyshev22 at gmail.com>
> 发送时间: 2022年9月5日 17:19
> 收件人: devel at edk2.groups.io
> 抄送: bob.c.feng at intel.com; gaoliming at byosoft.com.cn;
> yuwei.chen at intel.com; Konstantin Aladyshev <aladyshev22 at gmail.com>
> 主题: [PATCH] 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 at gmail.com>
> ---
>  BaseTools/Source/Python/Common/VpdInfoFile.py | 4 ++--
>  1 file 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
> 
> --
> 2.25.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#94019): https://edk2.groups.io/g/devel/message/94019
Mute This Topic: https://groups.io/mt/93817761/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list