* [PATCH] BaseTools: Correct BPDG tool error prints
@ 2022-09-05 9:19 Konstantin Aladyshev
2022-09-21 0:58 ` 回复: " gaoliming
2022-10-01 2:31 ` Bob Feng
0 siblings, 2 replies; 3+ messages in thread
From: Konstantin Aladyshev @ 2022-09-05 9:19 UTC (permalink / raw)
To: devel; +Cc: bob.c.feng, gaoliming, yuwei.chen, Konstantin Aladyshev
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* 回复: [PATCH] BaseTools: Correct BPDG tool error prints
2022-09-05 9:19 [PATCH] BaseTools: Correct BPDG tool error prints Konstantin Aladyshev
@ 2022-09-21 0:58 ` gaoliming
2022-10-01 2:31 ` Bob Feng
1 sibling, 0 replies; 3+ messages in thread
From: gaoliming @ 2022-09-21 0:58 UTC (permalink / raw)
To: 'Konstantin Aladyshev', devel; +Cc: bob.c.feng, yuwei.chen
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
> -----邮件原件-----
> 发件人: Konstantin Aladyshev <aladyshev22@gmail.com>
> 发送时间: 2022年9月5日 17:19
> 收件人: devel@edk2.groups.io
> 抄送: bob.c.feng@intel.com; gaoliming@byosoft.com.cn;
> yuwei.chen@intel.com; Konstantin Aladyshev <aladyshev22@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@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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] BaseTools: Correct BPDG tool error prints
2022-09-05 9:19 [PATCH] BaseTools: Correct BPDG tool error prints Konstantin Aladyshev
2022-09-21 0:58 ` 回复: " gaoliming
@ 2022-10-01 2:31 ` Bob Feng
1 sibling, 0 replies; 3+ messages in thread
From: Bob Feng @ 2022-10-01 2:31 UTC (permalink / raw)
To: Konstantin Aladyshev, devel@edk2.groups.io; +Cc: Gao, Liming, Chen, Christine
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
-----Original Message-----
From: Konstantin Aladyshev <aladyshev22@gmail.com>
Sent: Monday, September 5, 2022 5:19 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Konstantin Aladyshev <aladyshev22@gmail.com>
Subject: [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@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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-01 2:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-05 9:19 [PATCH] BaseTools: Correct BPDG tool error prints Konstantin Aladyshev
2022-09-21 0:58 ` 回复: " gaoliming
2022-10-01 2:31 ` Bob Feng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox