Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7591615c authored by Bill Peckham's avatar Bill Peckham Committed by android-build-merger
Browse files

Merge "Adding initial merge_target_files.py script to merge two target files packages."

am: 194b1c85

Change-Id: Id162301d1fd6bb8cfebcba29d0da47a29658994e
parents 19d6b0fb 194b1c85
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -190,6 +190,25 @@ def Run(args, verbose=None, **kwargs):
  return subprocess.Popen(args, **kwargs)


def RunAndWait(args, verbose=None, **kwargs):
  """Runs the given command and returns the exit code.

  Args:
    args: The command represented as a list of strings.
    verbose: Whether the commands should be shown. Default to the global
        verbosity if unspecified.
    kwargs: Any additional args to be passed to subprocess.Popen(), such as env,
        stdin, etc. stdout and stderr will default to subprocess.PIPE and
        subprocess.STDOUT respectively unless caller specifies any of them.

  Returns:
    The process return code.
  """
  proc = Run(args, verbose=verbose, **kwargs)
  proc.wait()
  return proc.returncode


def RunAndCheckOutput(args, verbose=None, **kwargs):
  """Runs the given command and returns the output.

+679 −0

File added.

Preview size limit exceeded, changes collapsed.