mirror of https://github.com/acidanthera/audk.git
BaseTools: Fix BPDG tool print traceback info issue
Fix BPDG tool print traceback info issue and remove abundant code Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
parent
e5001ab7a9
commit
b28d406b5a
|
@ -153,7 +153,10 @@ def StartBpdg(InputFileName, MapFileName, VpdFileName, Force):
|
||||||
EdkLogger.info("- Vpd pcd fixed done! -")
|
EdkLogger.info("- Vpd pcd fixed done! -")
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
r = main()
|
try:
|
||||||
|
r = main()
|
||||||
|
except FatalError as e:
|
||||||
|
r = e
|
||||||
## 0-127 is a safe return range, and 1 is a standard default error
|
## 0-127 is a safe return range, and 1 is a standard default error
|
||||||
if r < 0 or r > 127: r = 1
|
if r < 0 or r > 127: r = 1
|
||||||
sys.exit(r)
|
sys.exit(r)
|
||||||
|
|
|
@ -254,9 +254,8 @@ def CallExtenalBPDGTool(ToolPath, VpdFileName):
|
||||||
PopenObject.wait()
|
PopenObject.wait()
|
||||||
|
|
||||||
if PopenObject.returncode != 0:
|
if PopenObject.returncode != 0:
|
||||||
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))
|
EdkLogger.error("BPDG", BuildToolError.COMMAND_FAILURE, "Fail to execute BPDG tool with exit code: %d, the error message is: \n %s" % \
|
||||||
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)))
|
||||||
|
|
||||||
return PopenObject.returncode
|
return PopenObject.returncode
|
||||||
|
|
Loading…
Reference in New Issue