From dc0dae2d18d4b6f904e99e0ef9824d61ca750b3d Mon Sep 17 00:00:00 2001 From: fengyunhua Date: Fri, 30 Oct 2020 11:11:08 +0800 Subject: BaseTools: Fix BaseTools nmake cleanall hang issue On windows system, when use command chcp displays the number of the active console code page, if the active console code is 936, run make cleanall in the BaseTools will hang. Issue reproduce step: chcp 936 edksetup.bat VS2015 cd BaseTools nmake cleanall Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Signed-off-by: Yunhua Feng Reviewed-by: Liming Gao --- BaseTools/Source/C/Makefiles/NmakeSubdirs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'BaseTools') diff --git a/BaseTools/Source/C/Makefiles/NmakeSubdirs.py b/BaseTools/Source/C/Makefiles/NmakeSubdirs.py index 9b699ea086..1f4a45004f 100644 --- a/BaseTools/Source/C/Makefiles/NmakeSubdirs.py +++ b/BaseTools/Source/C/Makefiles/NmakeSubdirs.py @@ -45,7 +45,10 @@ def RunCommand(WorkDir=None, *Args, **kwargs): output_lock.acquire(True) print("execute command \"{0}\" in directory {1}".format(" ".join(Args), WorkDir)) - print(message) + try: + print(message) + except: + pass output_lock.release() return p.returncode, stdout -- cgit v1.2.3