BaseTools: Update python tool to call external tools with shell true mode
Python tool may run from source as the dos batch files. So, update python code to call external tools with shell true mode. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Erik Bjorge <erik.c.bjorge@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
This commit is contained in:
@ -233,14 +233,15 @@ def CallExtenalBPDGTool(ToolPath, VpdFileName):
|
||||
OutputBinFileName = os.path.join(OutputDir, "%s.bin" % BaseName)
|
||||
|
||||
try:
|
||||
PopenObject = subprocess.Popen([ToolPath,
|
||||
PopenObject = subprocess.Popen(' '.join([ToolPath,
|
||||
'-o', OutputBinFileName,
|
||||
'-m', OutputMapFileName,
|
||||
'-q',
|
||||
'-f',
|
||||
VpdFileName],
|
||||
VpdFileName]),
|
||||
stdout=subprocess.PIPE,
|
||||
stderr= subprocess.PIPE)
|
||||
stderr= subprocess.PIPE,
|
||||
shell=True)
|
||||
except Exception, X:
|
||||
EdkLogger.error("BPDG", BuildToolError.COMMAND_FAILURE, ExtraData="%s" % (str(X)))
|
||||
(out, error) = PopenObject.communicate()
|
||||
|
Reference in New Issue
Block a user