Skip to content

Commit

Permalink
Add optional parameters for RunPythonScript to match RunCmd
Browse files Browse the repository at this point in the history
RunPythonScript just calls into RunCmd. RunCmd got new optional parameters, this will plumb them through so callers of RunPythonScript will have access to them.
  • Loading branch information
mknutsen authored and spbrogan committed Aug 5, 2019
1 parent 42981b9 commit edb39d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions edk2toollib/utility_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ def RunCmd(cmd, parameters, capture=True, workingdir=None, outfile=None, outstre
####


def RunPythonScript(pythonfile, params, capture=True, workingdir=None, outfile=None, outstream=None, environ=None):
def RunPythonScript(pythonfile, params, capture=True, workingdir=None, outfile=None, outstream=None,
environ=None, logging_level=logging.INFO, raise_exception_on_nonzero=False):
# locate python file on path
pythonfile.strip('"\'')
if " " in pythonfile:
Expand All @@ -226,7 +227,8 @@ def RunPythonScript(pythonfile, params, capture=True, workingdir=None, outfile=N
break
params = pythonfile + " " + params
return RunCmd(sys.executable, params, capture=capture, workingdir=workingdir, outfile=outfile,
outstream=outstream, environ=environ)
outstream=outstream, environ=environ, logging_level=logging_level,
xraise_exception_on_nonzero=raise_exception_on_nonzero)
####
# Locally Sign input file using Windows SDK signtool. This will use a local Pfx file.
# WARNING!!! : This should not be used for production signing as that process should follow stronger
Expand Down

0 comments on commit edb39d8

Please sign in to comment.