EdkLogger.info("- Vpd pcd fixed done! -")\r
\r
if __name__ == '__main__':\r
- r = main()\r
+ try:\r
+ r = main()\r
+ except FatalError as e:\r
+ r = e\r
## 0-127 is a safe return range, and 1 is a standard default error\r
if r < 0 or r > 127: r = 1\r
sys.exit(r)\r
PopenObject.wait()\r
\r
if PopenObject.returncode != 0:\r
- if PopenObject.returncode != 0:\r
- EdkLogger.debug(EdkLogger.DEBUG_1, "Fail to call BPDG tool", str(error))\r
- EdkLogger.error("BPDG", BuildToolError.COMMAND_FAILURE, "Fail to execute BPDG tool with exit code: %d, the error message is: \n %s" % \\r
+ EdkLogger.debug(EdkLogger.DEBUG_1, "Fail to call BPDG tool", str(error))\r
+ EdkLogger.error("BPDG", BuildToolError.COMMAND_FAILURE, "Fail to execute BPDG tool with exit code: %d, the error message is: \n %s" % \\r
(PopenObject.returncode, str(error)))\r
\r
return PopenObject.returncode\r